Skip to content

Commit ed13150

Browse files
committed
CI: consolidate workflows and improve caching strategy
- Replace manual dependency installation with setup-build-deps action - Standardize all workflows to use ubuntu-24.04 for consistency - Add granular cache prefixes for different build types (lint, format, tx-fuzzing) - Improve build isolation and reduce cache conflicts across jobs
1 parent f512345 commit ed13150

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

.github/workflows/fmt.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ on:
88
jobs:
99
format:
1010
name: Format using nightly
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@v5
14-
- uses: dtolnay/rust-toolchain@stable
14+
- name: Setup Rust
15+
uses: ./.github/actions/setup-rust
1516
with:
1617
toolchain: nightly
1718
components: rustfmt
19+
cache-prefix: format-nightly-v0
1820
- uses: taiki-e/install-action@v2
1921
with:
2022
tool: taplo

.github/workflows/frontend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212

1313
jobs:
1414
frontend-test:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- name: Git checkout
1818
uses: actions/checkout@v5

.github/workflows/lint.yml renamed to .github/workflows/lint.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest]
15+
os: [ubuntu-24.04]
1616
toolchain: [1.84]
1717
steps:
1818
- uses: actions/checkout@v5
1919
- name: Setup build dependencies
20-
run: |
21-
sudo apt update || true
22-
sudo apt install -y protobuf-compiler sqlite3 || true
20+
uses: ./.github/actions/setup-build-deps
21+
with:
22+
include-sqlite: true
2323
- name: Setup SQLite database for SQLx
2424
run: |
2525
sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql
26-
- uses: dtolnay/rust-toolchain@stable
26+
- name: Setup Rust
27+
uses: ./.github/actions/setup-rust
2728
with:
2829
toolchain: ${{ matrix.toolchain }}
2930
components: clippy, rustfmt
31+
cache-prefix: lint-${{ matrix.toolchain }}-v0
3032
- name: Run make check
3133
run: make check
3234
env:
@@ -42,18 +44,18 @@ jobs:
4244
runs-on: ${{ matrix.os }}
4345
strategy:
4446
matrix:
45-
os: [ubuntu-latest]
47+
os: [ubuntu-24.04]
4648
toolchain: [nightly]
4749
steps:
4850
- uses: actions/checkout@v5
4951
- name: Setup build dependencies
50-
run: |
51-
sudo apt update || true
52-
sudo apt install -y protobuf-compiler || true
53-
- uses: dtolnay/rust-toolchain@stable
52+
uses: ./.github/actions/setup-build-deps
53+
- name: Setup Rust
54+
uses: ./.github/actions/setup-rust
5455
with:
5556
toolchain: ${{ matrix.toolchain }}
5657
components: clippy, rustfmt
58+
cache-prefix: lint-tx-fuzzing-${{ matrix.toolchain }}-v0
5759
- name: Run transaction Fuzzing check
5860
run: make check-tx-fuzzing
5961

@@ -63,7 +65,7 @@ jobs:
6365
runs-on: ${{ matrix.os }}
6466
strategy:
6567
matrix:
66-
os: [ubuntu-latest]
68+
os: [ubuntu-24.04]
6769
steps:
6870
- uses: actions/checkout@v5
6971
- name: Install shellcheck
@@ -79,7 +81,7 @@ jobs:
7981
runs-on: ${{ matrix.os }}
8082
strategy:
8183
matrix:
82-
os: [ubuntu-latest]
84+
os: [ubuntu-24.04]
8385
steps:
8486
- uses: actions/checkout@v5
8587
- name: Install hadolint

.github/workflows/markdown-format.yml renamed to .github/workflows/markdown-format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
markdown-format:
1010
name: Check Markdown Formatting
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v5

0 commit comments

Comments
 (0)