Skip to content

Commit c385071

Browse files
ci: configure rust caching and deterministic wasm builds
Issue: BTC-0
1 parent 233220b commit c385071

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,35 @@ jobs:
2525
with:
2626
ref: ${{ github.event.pull_request.head.sha }}
2727

28-
- name: Setup node ${{ matrix.node-version }}
29-
uses: actions/setup-node@v3
30-
with:
31-
node-version: ${{ matrix.node-version }}
32-
3328
- name: Install Rust
3429
uses: dtolnay/rust-toolchain@v1
3530
with:
3631
toolchain: nightly
3732

33+
- name: Cache Rust dependencies
34+
uses: Swatinem/rust-cache@v2
35+
with:
36+
workspaces: "packages/wasm-miniscript"
37+
cache-on-failure: true
38+
39+
- name: Setup node ${{ matrix.node-version }}
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
3844
- name: Install wasm-pack
3945
run: |
4046
rustup component add rustfmt
41-
cargo install wasm-pack
47+
cargo install wasm-pack --version 0.13.1
48+
cargo install wasm-opt --version 0.116.1
4249
4350
- name: Build Info
4451
run: |
4552
echo "node $(node --version)"
4653
echo "npm $(npm --version)"
54+
echo "rustc $(rustc --version)"
55+
echo "wasm-pack $(wasm-pack --version)"
56+
echo "wasm-opt $(wasm-opt --version)"
4757
git --version
4858
echo "base ref $GITHUB_BASE_REF"
4959
echo "head ref $GITHUB_HEAD_REF"

0 commit comments

Comments
 (0)