Skip to content

Commit c6be914

Browse files
author
Jake Champion
committed
when releasing the project, install all the tools required to compile the engine
1 parent 03b51c2 commit c6be914

File tree

1 file changed

+60
-4
lines changed

1 file changed

+60
-4
lines changed

.github/workflows/release-please.yml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
id: release
1313
with:
1414
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"
1717
bump-minor-pre-major: true
1818
bump-patch-for-minor-pre-major: true
1919
draft: false
@@ -26,9 +26,65 @@ jobs:
2626
- uses: actions/setup-node@v3
2727
if: ${{ steps.release.outputs.release_created }}
2828
with:
29-
cache: 'npm'
29+
cache: "npm"
3030
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 }}-
3288

3389
- run: npm ci && npm run build
3490
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)