-
Notifications
You must be signed in to change notification settings - Fork 81
85 lines (73 loc) · 2.12 KB
/
check.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
on:
pull_request:
push:
branches:
- 8.x
- try/**
tags-ignore:
- v*.*.*
name: Checks & Tests
env:
CARGO_TERM_COLOR: always
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
jobs:
check-and-test:
strategy:
matrix:
platform:
- ubuntu
- windows
- macos
toolchain:
- stable
- 1.70.0
name: Test on ${{ matrix.platform }} with ${{ matrix.toolchain }}
runs-on: "${{ matrix.platform }}-latest"
steps:
- uses: actions/checkout@v4
- name: Configure toolchain
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --no-self-update -c clippy
rustup default ${{ matrix.toolchain }}
- name: Check
run: cargo check
- name: Install
run: cargo install --debug --path .
- name: Test
run: cargo test
- name: Clippy
if: matrix.toolchain == 'stable'
run: cargo clippy
check-only:
strategy:
matrix:
target:
- x86_64-unknown-freebsd
- x86_64-unknown-linux-musl
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- aarch64-apple-darwin
- aarch64-pc-windows-msvc
include:
- target: x86_64-unknown-freebsd
platform: ubuntu-latest
- target: x86_64-unknown-linux-musl
platform: ubuntu-latest
- target: armv7-unknown-linux-gnueabihf
platform: ubuntu-latest
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
- target: aarch64-apple-darwin
platform: macos-latest
- target: aarch64-pc-windows-msvc
platform: windows-latest
name: Check only for ${{ matrix.target }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Configure toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update --target ${{ matrix.target }}
rustup default stable
- name: Check
run: cargo check --target ${{ matrix.target }}