Skip to content

Commit 76b7019

Browse files
ci: add Rust toolchain to test workflow\n\n- Install Rust toolchain with x86_64-unknown-linux-gnu target\n- Add cargo caching to speed up builds
1 parent 75365ba commit 76b7019

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ jobs:
4747
- name: Install dependencies
4848
run: npm ci
4949

50+
- name: Install Rust toolchain
51+
uses: dtolnay/rust-toolchain@stable
52+
with:
53+
targets: x86_64-unknown-linux-gnu
54+
55+
- name: Cache cargo
56+
uses: actions/cache@v3
57+
with:
58+
path: |
59+
~/.cargo/registry/index/
60+
~/.cargo/registry/cache/
61+
~/.cargo/git/db/
62+
.cargo-cache
63+
target/
64+
key: cargo-test-${{ runner.os }}-${{ matrix.node-version }}
65+
5066
- name: Build native module
5167
run: npx @napi-rs/cli build --target x86_64-unknown-linux-gnu
5268

0 commit comments

Comments
 (0)