Skip to content

Commit 6a43184

Browse files
committed
split build jobs and deps in two jobs
1 parent 41f6e3f commit 6a43184

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

.github/workflows/ci_tests.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
with:
3838
access_token: ${{ github.token }}
3939

40-
build-tests-artifacts:
41-
name: Build test artifacts
40+
build-test-dependencies:
41+
name: Build test dependencies
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Checkout code
@@ -57,9 +57,6 @@ jobs:
5757
shared-key: "test_cache"
5858
save-if: ${{ github.ref == 'refs/heads/main' }}
5959

60-
- name: Install nextest
61-
uses: taiki-e/install-action@nextest
62-
6360
- name: Install deps
6461
run:
6562
sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
@@ -68,9 +65,6 @@ jobs:
6865
run:
6966
cargo build -p vit-servicing-station-cli -p vit-servicing-station-server -p jcli -p jormungandr -p explorer
7067

71-
- name: Build and archive tests
72-
run: cargo nextest archive --archive-file nextest-archive.tar.zst
73-
7468
- name: Save external dependencies
7569
uses: actions/cache/save@v3
7670
with:
@@ -82,6 +76,37 @@ jobs:
8276
target/debug/explorer
8377
key: deps-${{ github.run_id }}-${{ github.run_attempt }}
8478

79+
80+
build-tests-artifacts:
81+
name: Build test artifacts
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Checkout code
85+
uses: actions/checkout@v3
86+
with:
87+
ref: ${{ github.event.pull_request.head.sha }}
88+
89+
- name: Install rust toolchain
90+
uses: actions-rs/toolchain@v1
91+
with:
92+
toolchain: ${{env.RUST_LATEST_STABLE_VERSION}}
93+
94+
- name: Cache rust
95+
uses: Swatinem/rust-cache@v2
96+
with:
97+
shared-key: "test_cache"
98+
save-if: ${{ github.ref == 'refs/heads/main' }}
99+
100+
- name: Install nextest
101+
uses: taiki-e/install-action@nextest
102+
103+
- name: Install deps
104+
run:
105+
sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
106+
107+
- name: Build and archive tests
108+
run: cargo nextest archive --archive-file nextest-archive.tar.zst
109+
85110
- name: Save test archive
86111
uses: actions/cache/save@v3
87112
with:
@@ -91,7 +116,7 @@ jobs:
91116
catalyst-core-tests:
92117
name: Catalyst Core Tests
93118
runs-on: ubuntu-latest
94-
needs: build-tests-artifacts
119+
needs: [build-tests-artifacts, build-test-dependencies]
95120
strategy:
96121
matrix:
97122
partition: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

0 commit comments

Comments
 (0)