Skip to content

Commit 1c83a63

Browse files
author
Devdutt Shenoi
committed
ci: cache rust builds to speed up compilations
1 parent bfca663 commit 1c83a63

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

.github/workflows/integration-test.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,36 @@ name: Integration
33
on:
44
pull_request:
55
paths-ignore:
6-
- 'docs/**'
7-
- 'helm/**'
8-
- 'assets/**'
9-
- '**.md'
6+
- "docs/**"
7+
- "helm/**"
8+
- "assets/**"
9+
- "**.md"
1010

1111
jobs:
12-
1312
docker-compose-test:
1413
name: Quest Smoke and Load Tests for Standalone deployments
1514
runs-on: ubuntu-latest
1615
steps:
1716
- name: Checkout
18-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
18+
- uses: Swatinem/rust-cache@v2
19+
with:
20+
shared-key: "target-cache"
1921
- name: Start compose
2022
run: docker compose -f docker-compose-test.yaml up --build --exit-code-from quest
2123
- name: Stop compose
22-
if: always()
2324
run: docker compose -f docker-compose-test.yaml down
2425

2526
docker-compose-distributed-test:
2627
name: Quest Smoke and Load Tests for Distributed deployments
2728
runs-on: ubuntu-latest
2829
steps:
2930
- name: Checkout
30-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
32+
- uses: Swatinem/rust-cache@v2
33+
with:
34+
shared-key: "target-cache"
3135
- name: Start compose
3236
run: docker compose -f docker-compose-distributed-test.yaml up --build --exit-code-from quest
3337
- name: Stop compose
34-
if: always()
3538
run: docker compose -f docker-compose-distributed-test.yaml down

.github/workflows/lint.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ name: Linter
33
on:
44
pull_request:
55
paths-ignore:
6-
- 'docs/**'
7-
- 'helm/**'
8-
- 'assets/**'
9-
- '**.md'
6+
- "docs/**"
7+
- "helm/**"
8+
- "assets/**"
9+
- "**.md"
1010

1111
env:
1212
REGISTRY: ghcr.io
1313
IMAGE_NAME: ${{ github.repository }}
1414

1515
jobs:
16-
1716
unit-tests:
1817
name: Unit tests
1918
runs-on: ubuntu-latest
@@ -24,6 +23,9 @@ jobs:
2423
profile: minimal
2524
toolchain: stable
2625
override: true
26+
- uses: Swatinem/rust-cache@v2
27+
with:
28+
shared-key: "target-cache"
2729
- uses: actions-rs/cargo@v1
2830
with:
2931
command: test
@@ -38,6 +40,9 @@ jobs:
3840
profile: minimal
3941
toolchain: stable
4042
override: true
43+
- uses: Swatinem/rust-cache@v2
44+
with:
45+
shared-key: "target-cache"
4146
- run: rustup component add rustfmt
4247
- uses: actions-rs/cargo@v1
4348
with:
@@ -54,6 +59,9 @@ jobs:
5459
profile: minimal
5560
toolchain: stable
5661
override: true
62+
- uses: Swatinem/rust-cache@v2
63+
with:
64+
shared-key: "target-cache"
5765
- run: rustup component add clippy
5866
- uses: actions-rs/cargo@v1
5967
with:

0 commit comments

Comments
 (0)