Skip to content

Commit 35f811e

Browse files
Cache WASM libs for CI speedups
1 parent a3af36a commit 35f811e

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/ci-emscripten.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ jobs:
2424
EMSCRIPTEN_VERSION: 3.1.58
2525
NODE_VERSION: 20
2626
steps:
27-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828

2929
- name: Set up Python ${{ env.PYTHON_VERSION }}
30-
id: setup-python
31-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
30+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3231
with:
3332
python-version: ${{ env.PYTHON_VERSION }}
3433

@@ -39,13 +38,19 @@ jobs:
3938
actions-cache-folder: emsdk-cache
4039

4140
- name: Set up Node.js
42-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
41+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
4342
with:
4443
node-version: ${{ env.NODE_VERSION }}
4544

4645
- name: Install pyodide-build
4746
run: pip install pyodide-build
4847

48+
- name: Cache WASM library directory
49+
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
50+
with:
51+
path: ${{ github.workspace }}/wasm-library-dir
52+
key: wasm-library-dir-${{ hashFiles('.github/workflows/ci-emscripten.yml') }}
53+
4954
- name: Build libgmp
5055
env:
5156
CFLAGS: "-fPIC"
@@ -104,6 +109,12 @@ jobs:
104109
emmake make -j $(nproc)
105110
emmake make install
106111
112+
- name: Cache WASM library directory
113+
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
114+
with:
115+
path: ${{ github.workspace }}/wasm-library-dir
116+
key: wasm-library-dir-${{ hashFiles('.github/workflows/ci-emscripten.yml') }}
117+
107118
- name: Build python-flint
108119
env:
109120
WASM_LIBRARY_DIR: ${{ github.workspace }}/wasm-library-dir

0 commit comments

Comments
 (0)