Skip to content

Commit

Permalink
Use cmake-fetch for dependencies (#208)
Browse files Browse the repository at this point in the history
* Use `cmake-fetch` for dependencies

* Use `stable` branch

* Use prebuilt version header

* Copy `version.h` to expected path and quote all paths

* Quote include directories as well

* Update test workflow

* Find `libsodium` sources via globbing
  • Loading branch information
kasperisager authored Nov 10, 2024
1 parent ea18b99 commit 4b664c3
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 349 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
name: ${{ matrix.platform }}-${{ matrix.arch }}${{ matrix.tags }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/test-node.yaml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x64
- os: macos-latest
platform: darwin
arch: arm64
- os: windows-latest
platform: win32
arch: x64
runs-on: ${{ matrix.os }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: choco upgrade llvm
if: ${{ matrix.platform == 'win32' }}
- run: npm install -g bare-make
- run: npm install
- run: bare-make generate --platform ${{ matrix.platform }} --arch ${{ matrix.arch }} --debug
- run: bare-make build
- run: bare-make install
- run: npm test
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

296 changes: 12 additions & 284 deletions CMakeLists.txt

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
"binding.c",
"macros.h",
"extensions",
"scripts",
"prebuilds",
"CMakeLists.txt",
"vendor/libsodium/src/**/*.c",
"vendor/libsodium/src/**/*.h",
"vendor/libsodium/src/**/*.h.in",
"vendor/libsodium/src/**/*.S"
"CMakeLists.txt"
],
"addon": true,
"dependencies": {
Expand All @@ -23,6 +18,7 @@
"devDependencies": {
"brittle": "^3.5.0",
"cmake-bare": "^1.1.10",
"cmake-fetch": "^1.0.1",
"cmake-napi": "^1.0.5",
"standard": "^17.1.0"
},
Expand Down
3 changes: 0 additions & 3 deletions scripts/endianness.js

This file was deleted.

18 changes: 0 additions & 18 deletions scripts/version.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/libsodium
Submodule libsodium deleted from 8855e8

0 comments on commit 4b664c3

Please sign in to comment.