Skip to content

Commit

Permalink
Switch to bare-make (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Buus <[email protected]>
  • Loading branch information
kasperisager and mafintosh authored Oct 23, 2024
1 parent 8d93d57 commit 0595cee
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ jobs:
- os: ubuntu-22.04
platform: android
arch: x64
flags: --android-ndk 26.1.10909125 --android-api 34
- os: ubuntu-22.04
platform: android
arch: ia32
flags: --android-ndk 26.1.10909125 --android-api 34
- os: ubuntu-22.04
platform: android
arch: arm64
flags: --android-ndk 26.1.10909125 --android-api 34
- os: ubuntu-22.04
platform: android
arch: arm
flags: --android-ndk 26.1.10909125 --android-api 34
- os: macos-12
- os: macos-14
platform: darwin
arch: x64
- os: macos-14
Expand Down Expand Up @@ -62,9 +58,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm install -g bare-dev
- run: npm install -g bare-make
- run: npm install
- run: bare-dev install --bare --node --platform ${{ matrix.platform }} --arch ${{ matrix.arch }} ${{ matrix.flags }}
- run: bare-make generate --platform ${{ matrix.platform }} --arch ${{ matrix.arch }} ${{ matrix.flags }}
- run: bare-make build
- run: bare-make install
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-${{ matrix.arch }}${{ matrix.tags }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ jobs:
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 https://github.com/actions/setup-node/releases/tag/v3.8.2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g bare-runtime bare-dev
- run: npm install -g bare-runtime bare-make
- run: npm install
- run: bare-dev install --bare --node --debug --force
- run: bare-make generate
- run: bare-make build
- run: bare-make install
- run: npm test
- run: bare test/all.js
- run: bare-dev install --bare --node --force
- run: bare-make generate --debug --no-cache
- run: bare-make build
- run: bare-make install
- run: npm test
- run: bare test/all.js
trigger_canary:
if: startsWith(github.ref, 'refs/tags/') # Only run when a new package is published (detects when a new tag is pushed)
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.25)

project(udx_native C)
find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
find_package(cmake-napi REQUIRED PATHS node_modules/cmake-napi)

include(bare)
include(napi)
project(udx_native C)

bare_target(target)

Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
},
"addon": true,
"scripts": {
"test": "standard && node test/all.js",
"test:all": "standard && brittle test/*.js test/slow/*.js",
"test": "npm run lint && npm run test:bare && npm run test:node",
"test:node": "node test/all.js",
"test:bare": "bare test/all.js",
"test:all": "brittle test/*.js test/slow/*.js",
"test:generate": "brittle -r test/all.js test/*.js",
"bench": "brittle test/bench/*.js"
"bench": "brittle test/bench/*.js",
"lint": "standard"
},
"repository": {
"type": "git",
Expand All @@ -52,6 +55,8 @@
},
"devDependencies": {
"brittle": "^3.1.0",
"cmake-bare": "^1.1.10",
"cmake-napi": "^1.0.5",
"is-ci": "^3.0.1",
"standard": "^17.1.0",
"tiny-byte-size": "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion vendor/libudx
Submodule libudx updated 4 files
+1 −0 CMakeLists.txt
+2 −4 src/endian.h
+1 −1 src/io_win.c
+2 −1 src/udx.c

0 comments on commit 0595cee

Please sign in to comment.