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 20, 2023
1 parent 2b63be5 commit e419f0f
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 @@ -112,6 +122,8 @@ jobs:
- name: Set nightly toolchain
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml

- uses: Swatinem/rust-cache@v2

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

Expand All @@ -125,6 +137,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 @@ -144,6 +158,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 @@ -159,6 +175,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 @@ -177,6 +195,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 e419f0f

Please sign in to comment.