summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-03-18 09:59:10 -0400
committerGitHub <noreply@github.com>2020-03-18 09:59:10 -0400
commit83f49161953c0c79056a56a19754fbf298f53f21 (patch)
tree3fcb2f9fc64c7cb6b0799218db82c0db3a8f1aaa
parentfb27e71c01983cd1a51802b2517815de39239a3c (diff)
ci: Use github action's cache in addition to sccache (#4417)
-rw-r--r--.github/workflows/ci.yml25
1 files changed, 24 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 91f36ab38..cf1096912 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -52,6 +52,23 @@ jobs:
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
+ # 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
uses: hecrj/setup-rust-action@v1
with:
@@ -134,10 +151,16 @@ jobs:
if: matrix.kind == 'lint'
run: python ./tools/test_format.py
- - name: Build
+ - name: Build release
if: matrix.kind == 'test_release' || matrix.kind == 'bench'
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
if: matrix.kind == 'test_release'
run: cargo test --release --locked --all-targets