|
12 | 12 | id: release
|
13 | 13 | with:
|
14 | 14 | release-type: node
|
15 |
| - package-name: '@fastly/js-compute' |
16 |
| - changelog-path: 'CHANGELOG.md' |
| 15 | + package-name: "@fastly/js-compute" |
| 16 | + changelog-path: "CHANGELOG.md" |
17 | 17 | bump-minor-pre-major: true
|
18 | 18 | bump-patch-for-minor-pre-major: true
|
19 | 19 | draft: false
|
|
26 | 26 | - uses: actions/setup-node@v3
|
27 | 27 | if: ${{ steps.release.outputs.release_created }}
|
28 | 28 | with:
|
29 |
| - cache: 'npm' |
| 29 | + cache: "npm" |
30 | 30 | node-version: 18
|
31 |
| - registry-url: 'https://registry.npmjs.org' |
| 31 | + registry-url: "https://registry.npmjs.org" |
| 32 | + |
| 33 | + - uses: ./.github/actions/cache-crates |
| 34 | + if: ${{ steps.release.outputs.release_created }} |
| 35 | + with: |
| 36 | + lockfiles: "c-dependencies/js-compute-runtime/**/Cargo.lock" |
| 37 | + |
| 38 | + - uses: ./.github/actions/install-rust |
| 39 | + if: ${{ steps.release.outputs.release_created }} |
| 40 | + with: |
| 41 | + path: c-dependencies |
| 42 | + |
| 43 | + - name: Cache SpiderMonkey object files |
| 44 | + if: ${{ steps.release.outputs.release_created }} |
| 45 | + uses: actions/cache@v2 |
| 46 | + id: sm-cache |
| 47 | + with: |
| 48 | + path: | |
| 49 | + c-dependencies/spidermonkey/${{ matrix.profile }} |
| 50 | + key: cache-${{ hashFiles( |
| 51 | + 'c-dependencies/spidermonkey/build-engine.sh', |
| 52 | + 'c-dependencies/spidermonkey/gecko-revision', |
| 53 | + 'c-dependencies/spidermonkey/object-files.list', |
| 54 | + 'c-dependencies/rust-toolchain.toml' |
| 55 | + ) }}-${{ matrix.profile }} |
| 56 | + |
| 57 | + - name: "Build SpiderMonkey" |
| 58 | + if: ${{ steps.release.outputs.release_created }} && steps.sm-cache.outputs.cache-hit != 'true' |
| 59 | + run: | |
| 60 | + cd c-dependencies/spidermonkey/ |
| 61 | + bash ./build-engine.sh ${{ matrix.profile }} |
| 62 | +
|
| 63 | + - name: "Install wasi-sdk (linux)" |
| 64 | + if: ${{ steps.release.outputs.release_created }} |
| 65 | + run: | |
| 66 | + set -x |
| 67 | + curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz |
| 68 | + tar xf wasi-sdk-12.0-linux.tar.gz |
| 69 | + sudo mkdir -p /opt/wasi-sdk |
| 70 | + sudo mv wasi-sdk-12.0/* /opt/wasi-sdk/ |
| 71 | +
|
| 72 | + - name: "Install Binaryen (linux)" |
| 73 | + if: ${{ steps.release.outputs.release_created }} |
| 74 | + run: | |
| 75 | + set -x |
| 76 | + export BINARYEN_VERSION=105 |
| 77 | + curl -sS -L "https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz" | tar xzf - && |
| 78 | + echo "$PWD/binaryen-version_${BINARYEN_VERSION}/bin" >> $GITHUB_PATH |
| 79 | +
|
| 80 | + - name: Cache built Rust dependencies |
| 81 | + if: ${{ steps.release.outputs.release_created }} |
| 82 | + uses: actions/cache@v3 |
| 83 | + with: |
| 84 | + path: c-dependencies/js-compute-runtime/rusturl |
| 85 | + key: engine-cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('c-dependencies/rust-toolchain.toml', 'c-dependencies/js-compute-runtime/**/Cargo.lock') }} |
| 86 | + # We trust cargo to only reuse valid parts of the cache when dependencies change. |
| 87 | + restore-keys: engine-cargo-${{ runner.os }}-${{ runner.arch }}- |
32 | 88 |
|
33 | 89 | - run: npm ci && npm run build
|
34 | 90 | if: ${{ steps.release.outputs.release_created }}
|
|
0 commit comments