Skip to content

Commit af33960

Browse files
committed
chore : add step to install protoc
1 parent 621dc13 commit af33960

File tree

2 files changed

+43
-23
lines changed

2 files changed

+43
-23
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
11
name: Build yellowstone-vixen crates
2+
# This workflow uses github runners.
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
# This may be adjusted to whatever suits best your runners config.
8+
# Current config will build on manual trigger or pull-request (each push)
29
on:
10+
# pull_request can be removed, to save minutes on github runners
311
pull_request:
12+
workflow_dispatch:
413
push:
514
branches:
615
- 'main'
7-
workflow_dispatch:
816

917
env:
1018
CARGO_TERM_COLOR: always
1119

1220
jobs:
1321
build:
1422
needs: pre-req # Ensure pre-req runs first
23+
# This can be also be runned on self-hosted github runners
1524
runs-on: ubuntu-22.04
25+
1626
steps:
17-
- name: Checkout repository
27+
- name: checkout repo
1828
uses: actions/checkout@v4
1929

20-
# Cache Rust Build Dependencies
21-
- name: Cache Rust Dependencies
30+
# This step can be omited, to save storage space on the organization account
31+
# Build process will take longer
32+
- name: Cache Build Dependencies
2233
uses: actions/cache@v4
2334
with:
2435
path: |
25-
~/.cargo/registry
26-
~/.cargo/git
27-
yellowstone-vixen/target
28-
key: cargo-${{ runner.os }}-${{ hashFiles('yellowstone-vixen/Cargo.lock') }}
29-
restore-keys: cargo-${{ runner.os }}-
36+
~/.cargo/bin/
37+
~/.cargo/registry/index/
38+
~/.cargo/registry/cache/
39+
~/.cargo/git/db/
40+
yellowstone-vixen/target/
41+
key: yellowstone_vixen_${{ hashFiles('yellowstone-vixen/Cargo.lock') }}
42+
restore-keys: |
43+
yellowstone_vixen
3044
3145
# Download protoc Artifact from pre-req.yml
3246
- name: Download protoc Artifact
@@ -40,5 +54,5 @@ jobs:
4054
run: protoc --version
4155

4256
# Build yellowstone-vixen
43-
- name: Build yellowstone-vixen
57+
- name: build yellowstone-vixen
4458
run: cargo build --verbose --release

.github/workflows/test.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
name: Check lock file, fmt, clippy
2+
# This workflow uses github runners.
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
# This may be adjusted to whatever suits best your runners config.
8+
# Current config will build on manual trigger or pull-request (each push)
29
on:
10+
# pull_request can be removed, to save minutes on github runners
311
pull_request:
412
push:
513
branches:
614
- 'main'
715
workflow_dispatch:
8-
916
env:
1017
CARGO_TERM_COLOR: always
11-
1218
jobs:
1319
test:
1420
needs: pre-req # Ensure pre-req runs first
1521
runs-on: ubuntu-22.04
1622
steps:
17-
- name: Checkout repository
23+
- name: checkout repo
1824
uses: actions/checkout@v4
19-
20-
- name: Cache Rust Dependencies
25+
- name: set build cache
2126
uses: actions/cache@v4
2227
with:
2328
path: |
24-
~/.cargo/registry
25-
~/.cargo/git
26-
yellowstone-vixen/target
27-
key: cargo-${{ runner.os }}-${{ hashFiles('yellowstone-vixen/Cargo.lock') }}
28-
restore-keys: cargo-${{ runner.os }}-
29+
~/.cargo/bin/
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
yellowstone-vixen/target/
34+
key: cargo-${{ hashFiles('**/Cargo.lock') }}-0001
2935

3036
# Download protoc Artifact from pre-req.yml
3137
- name: Download protoc Artifact
@@ -42,17 +48,17 @@ jobs:
4248
- name: Verify Protoc Version
4349
run: protoc --version
4450

45-
# Check Cargo.lock
51+
# Cargo.lock
4652
- name: Check lock file
4753
run: |
4854
cargo tree
4955
git checkout Cargo.lock
5056
cargo tree --frozen
5157
52-
# Run Formatting Check
58+
# fmt
5359
- name: Check fmt
5460
run: cargo +nightly fmt --all -- --check
5561

56-
# Run Clippy Linter
62+
# clippy
5763
- name: Check clippy
5864
run: cargo +nightly clippy --all-targets --tests -- -Dwarnings

0 commit comments

Comments
 (0)