diff options
| author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-04-07 23:17:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-07 10:17:55 -0400 |
| commit | fd65e6de3dc1ff909a1419c3b8f0c76daf1a69ed (patch) | |
| tree | 817317127065b66308c58794ea42c886d9a8fd88 /.github | |
| parent | 966ce7de8a23f63d0f30b1748fe69ccaf07519e0 (diff) | |
use incremental build in ci (#10053)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/ci.yml | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a0fa4a54..da415dd6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')) }} env: - CARGO_INCREMENTAL: 0 + CARGO_INCREMENTAL: 1 RUST_BACKTRACE: full CARGO_TERM_COLOR: always @@ -55,10 +55,10 @@ jobs: - name: Clone repository uses: actions/checkout@v2 with: - # Use depth > 1, because sometimes we need to rebuild main and if - # other commits have landed it will become impossible to rebuild if - # the checkout is too shallow. - fetch-depth: 5 + # Disables shallow clone. We use full git history for restoring the mtime + # of each file to enable incremental build. + # See https://github.com/denoland/deno/pull/10053 + fetch-depth: 0 submodules: true - name: Create source tarballs (release, linux) @@ -160,6 +160,18 @@ jobs: cargo --version deno --version + - name: Restore timestamps + run: python ./tools/restore_mtime.py + + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/git + ~/.cargo/registry + ./target + key: cache-1-${{ matrix.os }}-${{ matrix.kind }}-${{ hashFiles('Cargo.lock') }} + - name: test_format.js if: matrix.kind == 'lint' run: deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check |
