-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (86 loc) · 2.4 KB
/
ci.yml
File metadata and controls
107 lines (86 loc) · 2.4 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
merge_group:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: 1
jobs:
quality:
name: Quality
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: quality
- name: Check formatting
run: cargo fmt --all --check
- name: Run Clippy
run: cargo clippy --locked --all-targets --all-features -- -D warnings
test:
name: Tests
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: test
- name: Run tests
run: cargo test --locked --all-features --quiet
platform-smoke:
name: Platform smoke (${{ matrix.name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
include:
- name: linux-arm64
os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- name: macos-arm64
os: macos-15
target: aarch64-apple-darwin
- name: macos-x86_64
os: macos-15
target: x86_64-apple-darwin
- name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: platform-smoke
key: ${{ matrix.target }}
- name: Build
run: cargo build --locked --all-features --target ${{ matrix.target }} --verbose