Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 54 additions & 49 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: yarn
Expand Down Expand Up @@ -90,9 +90,9 @@ jobs:
name: stable - ${{ matrix.settings.target }} - node@22
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: yarn
Expand All @@ -102,7 +102,7 @@ jobs:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
~/.cargo/registry/index/
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
run: ${{ matrix.settings.build }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: bindings-${{ matrix.settings.target }}
path: |
Expand All @@ -144,44 +144,45 @@ jobs:
runs-on: ubuntu-latest
name: Build FreeBSD
steps:
- uses: actions/checkout@v6
- name: Build
id: build
uses: cross-platform-actions/action@v0.30.0
- uses: actions/checkout@v7
- name: Start FreeBSD VM
uses: cross-platform-actions/action@v1.4.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
with:
operating_system: freebsd
version: '14.2'
version: '15.1'
memory: 8G
cpu_count: 3
environment_variables: DEBUG RUSTUP_IO_THREADS
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm cmake
sudo npm install -g yarn --ignore-scripts
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
pwd
ls -lah
whoami
env
freebsd-version
yarn install
yarn build
rm -rf node_modules
rm -rf target
rm -rf .yarn/cache
- name: Build
shell: cpa.sh {0}
run: |
sudo pkg install -y -f curl node libnghttp2 npm cmake
sudo npm install -g yarn --ignore-scripts
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
pwd
ls -lah
whoami
env
freebsd-version
yarn install
yarn build
rm -rf node_modules
rm -rf target
rm -rf .yarn/cache
- name: Upload artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: bindings-freebsd
path: ${{ env.APP_NAME }}.*.node
Expand All @@ -207,21 +208,21 @@ jobs:
target: x86_64-apple-darwin
architecture: x64
node:
- '20'
- '22'
- '24'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: yarn
architecture: ${{ matrix.settings.architecture }}
- name: Install dependencies
run: yarn install
- name: Download artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.settings.target }}
path: .
Expand All @@ -244,13 +245,17 @@ jobs:
- aarch64-unknown-linux-musl
- armv7-unknown-linux-gnueabihf
node:
- '20'
- '22'
- '24'
exclude:
# Node 24 no longer ships linux/arm/v7 (32-bit ARM) builds
- target: armv7-unknown-linux-gnueabihf
node: '24'
runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -279,7 +284,7 @@ jobs:
yarn config set --json supportedArchitectures.libc '["current", "musl", "gnu"]'
yarn install
- name: Download artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.target }}
path: .
Expand All @@ -305,9 +310,9 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: yarn
Expand All @@ -316,7 +321,7 @@ jobs:
yarn config set supportedArchitectures.cpu "wasm32"
yarn install
- name: Download artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: bindings-wasm32-wasip1-threads
path: .
Expand All @@ -326,7 +331,7 @@ jobs:
- name: Test bindings
run: yarn test
env:
NAPI_RS_FORCE_WASI: 1
NAPI_RS_FORCE_WASI: true
publish:
name: Publish
runs-on: ubuntu-latest
Expand All @@ -340,9 +345,9 @@ jobs:
- test-linux-binding
- test-wasi
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: yarn
Expand All @@ -351,7 +356,7 @@ jobs:
- name: create npm dirs
run: yarn napi create-npm-dirs
- name: Download all artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Move artifacts
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,6 @@ Cargo.lock
!.yarn/releases
!.yarn/sdks
!.yarn/versions
/npm
/npm
# WASI build artifacts
*.wasm
Loading
Loading