-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (99 loc) · 2.86 KB
/
build.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
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
name: Build
permissions:
contents: read
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
jobs:
test:
name: Test - ${{ matrix.target }} with rust ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
# Disable until cross is fixed
#- x86_64-pc-windows-gnu
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Rust
run: rustup install --profile minimal ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Install cross
uses: taiki-e/install-action@cross
- name: Cache builds
uses: Swatinem/rust-cache@v2.7.5
with:
key: ${{ matrix.target }}
- name: Cross compile
run: cross test --target ${{ matrix.target }} --verbose --no-run
- name: Cross test
run: cross test --target ${{ matrix.target }} --verbose
exotic-os:
name: Test - ${{ matrix.target }} on ${{ matrix.os }} (stable rust)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Rust
run: |
rustup install --no-self-update --profile minimal stable
rustup target add ${{ matrix.target }}
rustup default stable
- name: Cache builds
uses: Swatinem/rust-cache@v2.7.5
- name: Compile
run: cargo test --target ${{ matrix.target }} --verbose --no-run
- name: Test
run: cargo test --target ${{ matrix.target }} --verbose
msrv:
# Test MSRV
name: "Test: MSRV (Linux): Rust ${{ matrix.rust }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- 1.75.0
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Rust
run: rustup install --profile minimal ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Cache builds
uses: Swatinem/rust-cache@v2.7.5
- name: Compile
run: cargo test --verbose --no-run
- name: Test
run: cargo test --verbose