-
Notifications
You must be signed in to change notification settings - Fork 25
110 lines (93 loc) · 2.72 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
on: [pull_request]
name: Tests
jobs:
checks:
name: Code Checks (formatting, clippy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Initialize Cargo x86
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/toolchain@v1
name: Initialize Cargo aarch64
with:
profile: minimal
toolchain: stable
target: aarch64-unknown-linux-gnu
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
name: Cargo Cache
- uses: actions-rs/cargo@v1
name: Check code formatting
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
name: Clippy check (x86)
with:
command: clippy
args: --all --all-targets -- --deny "warnings"
- uses: actions-rs/cargo@v1
name: Clippy check (arm64)
with:
command: clippy
args: --all --all-targets --target aarch64-unknown-linux-gnu -- --deny "warnings"
x86_tests:
name: x86 Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Initialize Cargo
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
name: Cargo Cache
# Ensure that everything happens safely (with runtime checks)
- uses: actions-rs/cargo@v1
name: Run tests (debug)
with:
command: test
# Ensure that no behavior gets optimized out
- uses: actions-rs/cargo@v1
name: Run tests (release)
with:
command: test
args: --release
arm_tests:
name: Arm Neon Tests
runs-on: ubuntu-latest
env:
QEMU_LD_PREFIX: /usr/aarch64-linux-gnu
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user
- uses: actions-rs/toolchain@v1
name: Initialize Cargo
with:
profile: minimal
toolchain: stable
target: aarch64-unknown-linux-gnu
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
name: Cargo Cache
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: aarch64
- uses: actions-rs/cargo@v1
name: Run tests (release)
with:
command: test
args: --release --target aarch64-unknown-linux-gnu