Skip to content

Commit c8b28af

Browse files
Skip build if cache htis
1 parent db1ef76 commit c8b28af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/ci-emscripten.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ jobs:
4545
- name: Install pyodide-build
4646
run: pip install pyodide-build
4747

48-
- name: Cache WASM library directory
48+
- name: Restore WASM library directory from cache
49+
id: cache-wasm-library-dir
4950
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
5051
with:
5152
path: ${{ github.workspace }}/wasm-library-dir
5253
key: wasm-library-dir-${{ hashFiles('.github/workflows/ci-emscripten.yml') }}
5354

5455
- name: Build libgmp
56+
if: steps.cache-wasm-library-dir.outputs.cache-hit != 'true'
5557
env:
5658
CFLAGS: "-fPIC"
5759
WASM_LIBRARY_DIR: ${{ github.workspace }}/wasm-library-dir
@@ -72,6 +74,7 @@ jobs:
7274
emmake make install
7375
7476
- name: Build libmpfr
77+
if: steps.cache-wasm-library-dir.outputs.cache-hit != 'true'
7578
env:
7679
CFLAGS: "-fPIC"
7780
WASM_LIBRARY_DIR: ${{ github.workspace }}/wasm-library-dir
@@ -91,6 +94,7 @@ jobs:
9194
9295
# might need patch
9396
- name: Build flint
97+
if: steps.cache-wasm-library-dir.outputs.cache-hit != 'true'
9498
env:
9599
CFLAGS: "-fPIC"
96100
WASM_LIBRARY_DIR: ${{ github.workspace }}/wasm-library-dir
@@ -109,7 +113,7 @@ jobs:
109113
emmake make -j $(nproc)
110114
emmake make install
111115
112-
- name: Cache WASM library directory
116+
- name: Persist WASM library directory to cache
113117
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
114118
with:
115119
path: ${{ github.workspace }}/wasm-library-dir

0 commit comments

Comments
 (0)