-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (48 loc) · 1.08 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
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
# run CI every day even if no PRs/merges occur
- cron: "0 12 * * *"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
- uses: actions/checkout@v3
- name: Format
run: cargo fmt && git diff --exit-code
- name: Lint
run: cargo clippy
- name: Cargo sort
run: |
cargo install cargo-sort
cargo sort -c
test:
runs-on: ubuntu-latest
steps:
- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Unit tests
run: cargo test
- name: Integration tests
run: |
cargo build --release
cd tests
./run_tests.sh