Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve caching in CI and CD #393

Merged
merged 2 commits into from Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/cd.yml
Expand Up @@ -28,15 +28,18 @@ jobs:
uses: actions/checkout@v3

- name: Setup Toolchain
uses: actions-rs/toolchain@v1
uses: oxidecomputer/actions-rs_toolchain@oxide/master
# see https://github.com/actions-rs/toolchain/pull/209
# uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
target: ${{ matrix.target }}
toolchain: stable

- name: Cache
uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.target }}

- name: Compile
uses: actions-rs/cargo@v1
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Expand Up @@ -29,11 +29,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
- name: Setup Toolchain
uses: oxidecomputer/actions-rs_toolchain@oxide/master
# see https://github.com/actions-rs/toolchain/pull/209
# uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
profile: minimal
target: ${{ matrix.target }}
- uses: actions-rs/cargo@4ff6ec2846f6e7217c1a9b0b503506665f134c4b
with:
command: fmt
Expand All @@ -50,9 +53,14 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
- name: Setup Toolchain
uses: oxidecomputer/actions-rs_toolchain@oxide/master
# see https://github.com/actions-rs/toolchain/pull/209
# uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@1232abb8968faf344409165de17cbf9e7f340fd8
- uses: actions-rs/cargo@4ff6ec2846f6e7217c1a9b0b503506665f134c4b
with:
Expand Down Expand Up @@ -82,10 +90,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
- name: Setup Toolchain
uses: oxidecomputer/actions-rs_toolchain@oxide/master
# see https://github.com/actions-rs/toolchain/pull/209
# uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }}
- run: rustup component add clippy
- uses: Swatinem/rust-cache@1232abb8968faf344409165de17cbf9e7f340fd8
- uses: actions-rs/clippy-check@9d09632661e31982c0be8af59aeb96b680641bc4
Expand Down