|
1 | 1 | 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) |
2 | 9 | on: |
| 10 | + # pull_request can be removed, to save minutes on github runners |
3 | 11 | pull_request: |
| 12 | + workflow_dispatch: |
4 | 13 | push: |
5 | 14 | branches: |
6 | 15 | - 'main' |
7 | | - workflow_dispatch: |
8 | 16 |
|
9 | 17 | env: |
10 | 18 | CARGO_TERM_COLOR: always |
11 | 19 |
|
12 | 20 | jobs: |
13 | 21 | build: |
14 | 22 | needs: pre-req # Ensure pre-req runs first |
| 23 | + # This can be also be runned on self-hosted github runners |
15 | 24 | runs-on: ubuntu-22.04 |
| 25 | + |
16 | 26 | steps: |
17 | | - - name: Checkout repository |
| 27 | + - name: checkout repo |
18 | 28 | uses: actions/checkout@v4 |
19 | 29 |
|
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 |
22 | 33 | uses: actions/cache@v4 |
23 | 34 | with: |
24 | 35 | 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 |
30 | 44 |
|
31 | 45 | # Download protoc Artifact from pre-req.yml |
32 | 46 | - name: Download protoc Artifact |
|
40 | 54 | run: protoc --version |
41 | 55 |
|
42 | 56 | # Build yellowstone-vixen |
43 | | - - name: Build yellowstone-vixen |
| 57 | + - name: build yellowstone-vixen |
44 | 58 | run: cargo build --verbose --release |
0 commit comments