-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.77 KB
/
build-chronicle.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Compile chronicle
on:
pull_request:
paths-ignore:
- 'contracts/**'
- 'docker/**'
- 'docs/**'
- 'node/**'
- 'infra/**'
- 'js/**'
- 'scripts/**'
- 'tester/**'
- 'utils/**'
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-chronicle:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile:
- production
- testnet
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y musl-tools protobuf-compiler
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install rust toolchain
run : rustup show
- name: Setup and cache sccache
uses: visvirial/[email protected]
with:
cache-key: sccache-chronicle-${{ matrix.profile }}
- name: Cache cargo registry and index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-cache-chronicle-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-cache-chronicle-
- name: Cache cargo build output
uses: actions/cache@v4
with:
path: target
key: cargo-build-chronicle-${{ matrix.profile }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-build-chronicle-${{ matrix.profile }}-
- name: Build chronicle
run: cargo build --package chronicle --profile ${{ matrix.profile }}
- name: Upload chronicle
uses: actions/upload-artifact@v4
with:
name: chronicle.${{ matrix.profile }}
if-no-files-found: error
path: target/${{ matrix.profile }}/chronicle