-
Notifications
You must be signed in to change notification settings - Fork 30
73 lines (57 loc) · 1.72 KB
/
CI.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
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-C debuginfo=0'
jobs:
test:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
toolchain: [stable, beta]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
rustup default ${{ matrix.toolchain }}
- name: Cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: 'v0-rust-2'
- name: Run test suite
run: cargo test --workspace --no-default-features --features x11
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add clippy rustfmt
- name: Check spelling
uses: crate-ci/typos@master
- name: Formatting
run: cargo fmt --check
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Linting
run: cargo clippy --workspace --no-default-features --features x11 -- --deny warnings
build-macos-arm:
runs-on: macos-latest
strategy:
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
- name: Install target
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
rustup default ${{ matrix.toolchain }}
rustup target add aarch64-apple-darwin
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --target=aarch64-apple-darwin --no-default-features --features x11