-
-
Notifications
You must be signed in to change notification settings - Fork 13
57 lines (45 loc) · 1.17 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '30 2 * * *'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
name: Build & Test Project
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: typos-action
uses: crate-ci/typos@v1.23.6
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
echo "/usr/lib/llvm-18/bin" >> $GITHUB_PATH
echo "CC=/usr/lib/llvm-18/bin/clang" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Cargo Cache
uses: Swatinem/rust-cache@v2
- name: Build project
run: cargo build
- name: Test project
run: cargo test --all
- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
clippy_flags: --workspace --no-deps
filter_mode: nofilter
github_token: ${{ secrets.GITHUB_TOKEN }}