@@ -54,31 +54,42 @@ jobs:
5454      - name : Checkout 
5555        uses : actions/checkout@v4 
5656
57+       - name : Restore build cache 
58+         id : build-cache 
59+         uses : actions/cache@v4 
60+         with :
61+           path : rewatch/target 
62+           key : rewatch-build-${{ matrix.rust-target }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.lock') }} 
63+ 
5764      - name : Install musl gcc 
58-         if : runner.os == 'Linux' 
65+         if : steps.build-cache.outputs.cache-hit != 'true' &&  runner.os == 'Linux'
5966        run : sudo apt-get install -y --no-install-recommends musl-tools 
6067
6168      - name : Set up sccache 
69+         if : steps.build-cache.outputs.cache-hit != 'true' 
6270        uses : mozilla-actions/sccache-action@v0.0.4 
6371        with :
6472          version : " v0.8.0" 
6573
6674      - name : Install rust toolchain 
75+         if : steps.build-cache.outputs.cache-hit != 'true' 
6776        uses : dtolnay/rust-toolchain@master 
6877        with :
6978          toolchain : stable 
7079          targets : ${{matrix.rust-target}} 
7180
7281      - name : Build rewatch 
82+         if : steps.build-cache.outputs.cache-hit != 'true' 
7383        run : cargo build --manifest-path rewatch/Cargo.toml --target ${{matrix.rust-target}} --release 
7484
7585      - name : Get artifact dir name 
86+         id : artifact-dir 
7687        run : node .github/workflows/get_artifact_dir_name.js 
7788
7889      - name : " Upload artifact: rewatch binary" 
7990        uses : actions/upload-artifact@v4 
8091        with :
81-           name : rewatch-${{env.artifact_dir_name }} 
92+           name : rewatch-${{ steps.artifact-dir.dirname  }} 
8293          path : rewatch/target/${{matrix.rust-target}}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} 
8394
8495  #  Build statically linked Linux binaries in an Alpine-based Docker container
@@ -373,6 +384,7 @@ jobs:
373384      - name : Build playground compiler 
374385        if : matrix.os == 'ubuntu-latest' 
375386        run : | 
387+           opam install js_of_ocaml.5.8.1 
376388          opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js 
377389          opam exec -- dune build --profile browser 
378390          cp ./_build/default/jscomp/jsoo/jsoo_playground_main.bc.js playground/compiler.js 
0 commit comments