Skip to content

Commit

Permalink
ci: Enable caching
Browse files Browse the repository at this point in the history
Now that most jobs are on the stable channel, enabling caching should be more
effective than it would have been on nightly.
  • Loading branch information
nicholasbishop committed Mar 25, 2023
1 parent 61840e0 commit 1d46338
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Install qemu and OVMF
run: |
sudo apt-get update
Expand All @@ -36,6 +38,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Install qemu and OVMF
run: |
sudo apt-get update
Expand All @@ -52,6 +56,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Install qemu and OVMF
run: |
sudo apt-get update
Expand All @@ -68,6 +74,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Run cargo test (without unstable)
run: cargo xtask test

Expand All @@ -78,6 +86,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Run cargo fmt
run: |
rustup component add rustfmt
Expand Down Expand Up @@ -111,6 +121,8 @@ jobs:
- name: Set MSRV toolchain
run: cp .github/workflows/msrv_toolchain.toml rust-toolchain.toml

- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo xtask test-latest-release

Expand All @@ -124,6 +136,8 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Run VM tests
run: cargo xtask run --target x86_64 --ci
timeout-minutes: 6
Expand All @@ -143,6 +157,8 @@ jobs:
- name: Set toolchain
run: cp .github/workflows/msrv_toolchain.toml rust-toolchain.toml

- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo xtask build

Expand All @@ -158,6 +174,8 @@ jobs:
- name: Set nightly toolchain so that `unstable` can be included
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml

- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo xtask build --feature-permutations

Expand All @@ -176,6 +194,8 @@ jobs:
- name: Enable nightly toolchain
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml

- uses: Swatinem/rust-cache@v2

- name: Run VM tests with the `unstable` feature
run: cargo xtask run --target x86_64 --headless --ci --unstable
timeout-minutes: 4
Expand Down

0 comments on commit 1d46338

Please sign in to comment.