-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (88 loc) · 2.52 KB
/
tests.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
on:
push:
branches: [main, dev]
pull_request:
name: 64 bit CI
jobs:
test-64bit:
name: Run tests (64 bit)
runs-on: ${{ matrix.os }}
#container:
# image: ubuntu:20.10
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust:
- stable
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- run: sudo apt-get update -y
if: matrix.os == 'ubuntu-latest'
- name: cargo check (powerset)
run: cargo hack check --feature-powerset --no-dev-deps
- name: cargo check examples (powerset)
run: cargo hack check --examples --feature-powerset
- name: run tests (powerset)
run: |
cargo hack test --all-targets --feature-powerset
- name: run doc tests (powerset)
run: |
cargo hack test --doc --feature-powerset
fmt:
name: rust fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- run: |
/bin/bash -c "find src -type f | grep -v auto_bindings | grep -v lib | xargs rustfmt --check"
clippy:
name: clippy!!
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: clippy (all targets, feature powerset)
run: cargo hack clippy --all-targets --feature-powerset -- -D warnings
msrv:
name: Verify MSRV
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.75.0
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@cargo-hack
- name: cargo check msrv
run: cargo hack check --feature-powerset