-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (45 loc) · 1.62 KB
/
build-all-targets.yml
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
name: Build All Targets
on:
push:
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt install protobuf-compiler
- name: Cache build products
uses: Swatinem/rust-cache@v2.7.3
with:
# Split the test and bench caches, the have different debug settings
key: "test"
- name: Install Rust nightly
run: rustup toolchain install nightly-2024-07-10
- name: Set Rust nightly as default
run: rustup default nightly-2024-07-10
# Building tests in release mode checks warnings and compiler errors that depend on optimisations
- name: Build Tests
run: cargo build --release --all-features --tests
build-bins:
runs-on:
labels: ubuntu-22.04-64core
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt install protobuf-compiler
- name: Cache build products
uses: Swatinem/rust-cache@v2.7.3
with:
# Split the test and bench caches, they have different debug settings
key: "bench"
- name: Install Rust nightly
run: rustup toolchain install nightly-2024-07-10
- name: Set Rust nightly as default
run: rustup default nightly-2024-07-10
- name: Build All Targets
run: cargo build --release --all-features --lib --bins --benches --examples