Skip to content

Commit 85d245c

Browse files
committed
add actions
1 parent 171717f commit 85d245c

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/tests.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
RUSTFLAGS: "-C target-cpu=native"
13+
14+
jobs:
15+
test:
16+
strategy:
17+
matrix:
18+
os: [windows-latest, ubuntu-latest]
19+
target:
20+
[
21+
"i686-pc-windows-msvc",
22+
"x86_64-pc-windows-msvc",
23+
"i686-unknown-linux-gnu",
24+
"x86_64-unknown-linux-gnu",
25+
]
26+
exclude:
27+
- os: windows-latest
28+
target: "i686-unknown-linux-gnu"
29+
- os: windows-latest
30+
target: "x86_64-unknown-linux-gnu"
31+
- os: ubuntu-latest
32+
target: "i686-pc-windows-msvc"
33+
- os: ubuntu-latest
34+
target: "x86_64-pc-windows-msvc"
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: actions/checkout@v3
38+
39+
- name: Configure env (linux)
40+
if: runner.os == 'Linux'
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y ninja-build gcc-multilib g++-multilib
44+
45+
- uses: dtolnay/rust-toolchain@stable
46+
with:
47+
toolchain: stable
48+
components: clippy
49+
50+
- name: Run sccache-cache
51+
uses: mozilla-actions/sccache-action@v0.0.3
52+
53+
- name: Run clippy
54+
run: cargo clippy -- -D warnings
55+
56+
- name: Run tests
57+
run: cargo test

0 commit comments

Comments
 (0)