Skip to content

Commit

Permalink
ci: fix cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
cagatay-y committed Oct 6, 2023
1 parent c4d8589 commit a17a31a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
- uses: taiki-e/install-action@cargo-hack
- uses: mkroening/rust-toolchain-toml@main
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Check each feature
run: cargo hack check --package hermit-kernel --each-feature --no-dev-deps --target x86_64-unknown-none
env:
Expand All @@ -38,7 +39,8 @@ jobs:
- uses: mkroening/rust-toolchain-toml@main
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo xtask clippy

format:
Expand All @@ -58,7 +60,8 @@ jobs:
- uses: mkroening/rust-toolchain-toml@main
- run: rustup target add aarch64-unknown-none-softfloat
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Check docs
run: |
cargo doc --package hermit-kernel --no-deps --document-private-items --target x86_64-unknown-none
Expand All @@ -71,7 +74,8 @@ jobs:
- uses: actions/checkout@v4
- uses: mkroening/rust-toolchain-toml@main
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build minimal kernel
run: |
cargo xtask build --arch x86_64 --no-default-features
Expand All @@ -88,7 +92,8 @@ jobs:
sudo apt-get install qemu-system-x86
- uses: mkroening/rust-toolchain-toml@main
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Unit tests
run: cargo test --lib
env:
Expand Down Expand Up @@ -169,8 +174,8 @@ jobs:
with:
toolchain-file: 'kernel/rust-toolchain.toml'
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
workspaces: |
.
kernel
Expand Down Expand Up @@ -252,7 +257,8 @@ jobs:
with:
toolchain-file: 'kernel/rust-toolchain.toml'
- uses: Swatinem/rust-cache@v2
save-if: ${{ github.ref == 'refs/heads/main' }}
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: rusty_demo on Uhyve
run: cargo xtask ci uhyve --arch x86_64 --package rusty_demo
- name: rusty_demo on Uhyve (release)
Expand Down

0 comments on commit a17a31a

Please sign in to comment.