mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
ci: Use github action's cache in addition to sccache (#4417)
This commit is contained in:
parent
fb27e71c01
commit
83f4916195
1 changed files with 24 additions and 1 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -52,6 +52,23 @@ jobs:
|
||||||
mkdir -p target/release
|
mkdir -p target/release
|
||||||
tar --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno
|
tar --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno
|
||||||
|
|
||||||
|
# Cache https://github.com/actions/cache/blob/master/examples.md#rust---cargo
|
||||||
|
- name: Cache cargo registry
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo index
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo build
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: hecrj/setup-rust-action@v1
|
uses: hecrj/setup-rust-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -134,10 +151,16 @@ jobs:
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.kind == 'lint'
|
||||||
run: python ./tools/test_format.py
|
run: python ./tools/test_format.py
|
||||||
|
|
||||||
- name: Build
|
- name: Build release
|
||||||
if: matrix.kind == 'test_release' || matrix.kind == 'bench'
|
if: matrix.kind == 'test_release' || matrix.kind == 'bench'
|
||||||
run: cargo build --release --locked --all-targets
|
run: cargo build --release --locked --all-targets
|
||||||
|
|
||||||
|
- name: Build debug
|
||||||
|
if: matrix.kind == 'test_debug'
|
||||||
|
run: |
|
||||||
|
echo ::set-env name=DENO_BUILD_MODE::debug
|
||||||
|
cargo build --locked --all-targets
|
||||||
|
|
||||||
- name: Test release
|
- name: Test release
|
||||||
if: matrix.kind == 'test_release'
|
if: matrix.kind == 'test_release'
|
||||||
run: cargo test --release --locked --all-targets
|
run: cargo test --release --locked --all-targets
|
||||||
|
|
Loading…
Reference in a new issue