-
Notifications
You must be signed in to change notification settings - Fork 36
79 lines (72 loc) · 2.51 KB
/
main.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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.63]
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- run: |
rustup set profile minimal
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
cargo check --features "netlink"
cargo check --no-default-features --features "std netlink"
cargo check --no-default-features --features "no_std netlink"
cargo check --no-default-features --features "no_std general errno"
test:
name: Test
runs-on: ubuntu-latest
env:
# -D warnings is commented out in our install-rust action; re-add it here.
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
with:
toolchain: stable
- run: >
rustup target add
x86_64-unknown-linux-musl
x86_64-unknown-linux-gnux32
i686-unknown-linux-gnu
i686-unknown-linux-musl
riscv64gc-unknown-linux-gnu
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
powerpc64le-unknown-linux-gnu
armv5te-unknown-linux-gnueabi
loongarch64-unknown-linux-gnu
- run: cargo check --tests -vv
- run: cargo check --tests -vv --target=x86_64-unknown-linux-musl
- run: cargo check --tests -vv --target=x86_64-unknown-linux-gnux32
- run: cargo check --tests -vv --target=i686-unknown-linux-gnu
- run: cargo check --tests -vv --target=i686-unknown-linux-musl
- run: cargo check --tests -vv --target=riscv64gc-unknown-linux-gnu
- run: cargo check --tests -vv --target=aarch64-unknown-linux-gnu
- run: cargo check --tests -vv --target=aarch64-unknown-linux-musl
- run: cargo check --tests -vv --target=powerpc64le-unknown-linux-gnu
- run: cargo check --tests -vv --target=armv5te-unknown-linux-gnueabi
- run: cargo check --tests -vv --target=loongarch64-unknown-linux-gnu
gen:
name: Update generated files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
sudo apt install libclang-dev
cd gen && LD_LIBRARY_PATH=/usr/lib/llvm-20/lib cargo run --release
git diff --exit-code