-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (49 loc) · 1.37 KB
/
commit.yml
File metadata and controls
51 lines (49 loc) · 1.37 KB
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: Commit
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
dynamic_rust:
name: Dynamic Rust module lint/test/build on (${{ matrix.platform.arch }})
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-24.04
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ matrix.platform.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.platform.os }}-cargo-registry-
- name: Cache Cargo git index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ matrix.platform.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.platform.os }}-cargo-git-
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy, rustfmt
- name: Check format
run: cargo fmt -- --check
- name: Run Clippy linter
run: cargo clippy -- -D warnings
- name: Build module
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose