-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (62 loc) · 2 KB
/
ci.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
66
67
68
69
70
71
72
73
74
name: "Rust CI"
on:
pull_request:
paths:
- "crates/**"
- "Cargo.toml"
- ".github/workflows/ci.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: "always"
CARGO_INCREMENTAL: "0"
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
# Rust version to use.
nightly: nightly-2024-08-01
jobs:
build:
name: CI
strategy:
matrix:
# Needs big runners to run tests
# Only macos-13-xlarge is Apple Silicon, as per:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#about-macos-larger-runners
os: [ubuntu-22.04-github-hosted-16core, macos-13-xlarge]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.nightly }}
components: rustfmt, clippy
# Remove default `-D warnings`. This is a temporary measure.
rustflags: ""
- name: Install sccache
uses: mozilla-actions/[email protected]
- name: Format
run: cargo fmt --all -- --check
- name: Install nextest
run: cargo install cargo-nextest
- name: Run tests
run: cargo nextest run --no-fail-fast
build_stable:
name: Build (stable)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
# Remove default `-D warnings`. This is a temporary measure.
rustflags: ""
- name: Install sccache
uses: mozilla-actions/[email protected]
# Bellman crate *must* build on stable, because parts of the core
# codebase are only used in the context of stable compiler.
- name: Build
run: |
cargo build -p bellman