-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache artifacts in all GitHub Actions when testing locally. (#278)
Signed-off-by: Piotr Sikora <[email protected]>
- Loading branch information
1 parent
36623cd
commit 5376967
Showing
1 changed file
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,14 @@ jobs: | |
with: | ||
go-version: '^1.16' | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
key: licenses-${{ hashFiles('.github/workflows/rust.yml') }} | ||
|
||
- name: Check licenses | ||
run: | | ||
go install github.com/google/addlicense@latest | ||
|
@@ -53,11 +61,6 @@ jobs: | |
with: | ||
go-version: '^1.16' | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
go install github.com/bazelbuild/[email protected] | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
|
@@ -66,9 +69,16 @@ jobs: | |
~/.cache/bazelisk | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }} | ||
~/go/pkg/mod | ||
key: bazel-${{ hashFiles('BUILD', 'WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
go install github.com/bazelbuild/[email protected] | ||
- name: Build (wasm32-unknown-unknown) | ||
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //... | ||
|
@@ -96,6 +106,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
**/target | ||
key: msrv-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -145,6 +169,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
**/target | ||
key: stable-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -193,6 +231,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
**/target | ||
key: nightly-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -239,6 +291,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
key: outdated-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -259,6 +324,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
key: audit-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -298,6 +376,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
**/target | ||
key: example-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|
@@ -364,6 +456,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/advisory-db | ||
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
**/target | ||
key: reactor-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
|