summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-10-09 15:26:15 +0200
committerBert Belder <bertbelder@gmail.com>2020-10-09 17:03:58 +0200
commit265c25754b56c60f72dd2a67cbb4c12696c7b3bb (patch)
treed851fda017cf58b12134d8de77586214810a7a0a
parentf911dc3afe521e018553d98bc904870817f5310f (diff)
ci: add workaround for MacOS + Cargo + Github Actions cache bug (#7898)
-rw-r--r--.github/workflows/ci.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a381bb757..91f551f2a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -119,6 +119,35 @@ jobs:
restore-keys: |
deno-${{ matrix.os }}-${{ matrix.kind }}-
+ # It seems that the 'target' directory does not always get restored
+ # from cache correctly on MacOS. In the build log we see the following:
+ #
+ # Fresh serde_derive v1.0.115
+ #
+ # But a little while after that Cargo aborts because 'serde_derive' is
+ # now nowhere to be found. We're not the only ones experiencing this,
+ # see https://github.com/actions-rs/cargo/issues/111.
+ #
+ # error[E0463]: can't find crate for `serde_derive`
+ # ##[error] --> /Users/runner/.cargo/registry/src/github.com-
+ # | 1ecc6299db9ec823/serde-1.0.115/src/lib.rs:285:1
+ # |
+ # 285 | extern crate serde_derive;
+ # | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
+ - name: Work around MacOS + Cargo + Github Actions cache bug
+ if: runner.os == 'macOS'
+ run: |
+ cargo clean --locked --release \
+ -p ast_node \
+ -p is-macro \
+ -p serde_derive \
+ -p swc_ecma_codegen \
+ -p swc_ecma_codegen_macros \
+ -p swc_ecma_parser \
+ -p swc_ecma_parser_macros \
+ -p swc_visit \
+ -p swc_visit_macros
+
- name: lint.py
if: matrix.kind == 'lint'
run: python ./tools/lint.py