Skip to content

Commit 112963a

Browse files
authored
feat: enhance CI workflows with caching for Node.js and Rust dependen… (#105)
…cies --------- Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent 2772d4d commit 112963a

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,21 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- uses: actions/setup-node@v3
25+
- uses: actions/setup-node@v4
2626
with:
2727
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
30+
- name: Setup Rust toolchain
31+
uses: dtolnay/rust-toolchain@stable
32+
with:
33+
targets: wasm32-unknown-unknown
34+
35+
- name: Cache Rust dependencies
36+
uses: Swatinem/rust-cache@v2
37+
with:
38+
workspaces: wit-bindgen-wasm
39+
shared-key: ${{ runner.os }}-cargo-${{ hashFiles('wit-bindgen-wasm/Cargo.lock') }}
2840

2941
- name: Install dependencies
3042
run: npm ci

.github/workflows/commit-message-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
commitlint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16-
- uses: wagoid/commitlint-github-action@v5
16+
- uses: wagoid/commitlint-github-action@v6

.github/workflows/release-please.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,23 @@ jobs:
4949
- uses: actions/checkout@v4
5050
with:
5151
ref: ${{ steps.event_details.outputs.tag_name }}
52+
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version: 22
56+
cache: 'npm'
57+
58+
- name: Setup Rust toolchain
59+
uses: dtolnay/rust-toolchain@stable
60+
with:
61+
targets: wasm32-unknown-unknown
62+
63+
- name: Cache Rust dependencies
64+
uses: Swatinem/rust-cache@v2
65+
with:
66+
workspaces: wit-bindgen-wasm
67+
shared-key: release-cargo-${{ hashFiles('wit-bindgen-wasm/Cargo.lock') }}
68+
5269
- name: Build VSIX and upload to release
5370
env:
5471
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)