Skip to content

Commit 6e01f8c

Browse files
committed
Adopt Swatinem/rust-cache for faster CI
Signed-off-by: Ondra Pelech <[email protected]>
1 parent a13ba6d commit 6e01f8c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- name: Bootc Ubuntu Setup
3434
uses: ./.github/actions/bootc-ubuntu-setup
35+
- name: Setup Rust cache
36+
uses: step-security/rust-cache@v2
37+
with:
38+
save-if: ${{ github.ref == 'refs/heads/main' }}
3539
- name: Validate (default)
3640
run: just validate
3741
# Build container with continuous repository enabled
@@ -41,6 +45,10 @@ jobs:
4145
- uses: actions/checkout@v4
4246
- name: Bootc Ubuntu Setup
4347
uses: ./.github/actions/bootc-ubuntu-setup
48+
- name: Setup Rust cache
49+
uses: step-security/rust-cache@v2
50+
with:
51+
save-if: ${{ github.ref == 'refs/heads/main' }}
4452
- name: Build with continuous repo enabled
4553
run: sudo just build --build-arg=continuous_repo=1
4654
# Check for security vulnerabilities and license compliance
@@ -62,6 +70,10 @@ jobs:
6270
uses: actions/checkout@v4
6371
- name: Bootc Ubuntu Setup
6472
uses: ./.github/actions/bootc-ubuntu-setup
73+
- name: Setup Rust cache
74+
uses: step-security/rust-cache@v2
75+
with:
76+
save-if: ${{ github.ref == 'refs/heads/main' }}
6577
- name: Enable fsverity for /
6678
run: sudo tune2fs -O verity $(findmnt -vno SOURCE /)
6779
- name: Install utils
@@ -76,7 +88,6 @@ jobs:
7688
sudo podman build -t localhost/bootc-fsverity -f ci/Containerfile.install-fsverity
7789
7890
# TODO move into a container, and then have this tool run other containers
79-
export CARGO_INCREMENTAL=0 # because we aren't caching the test runner bits
8091
cargo build --release -p tests-integration
8192
8293
df -h /
@@ -116,6 +127,10 @@ jobs:
116127
- uses: actions/checkout@v4
117128
- name: Bootc Ubuntu Setup
118129
uses: ./.github/actions/bootc-ubuntu-setup
130+
- name: Setup Rust cache
131+
uses: step-security/rust-cache@v2
132+
with:
133+
save-if: ${{ github.ref == 'refs/heads/main' }}
119134
- name: Build mdbook
120135
run: just build-mdbook
121136
# Build containers and disk images for integration testing across OS matrix
@@ -131,6 +146,10 @@ jobs:
131146
- uses: actions/checkout@v4
132147
- name: Bootc Ubuntu Setup
133148
uses: ./.github/actions/bootc-ubuntu-setup
149+
- name: Setup Rust cache
150+
uses: step-security/rust-cache@v2
151+
with:
152+
save-if: ${{ github.ref == 'refs/heads/main' }}
134153
- name: Install qemu-utils
135154
run: sudo apt install -y qemu-utils
136155

0 commit comments

Comments
 (0)