-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (58 loc) · 1.47 KB
/
Copy pathci.yaml
File metadata and controls
63 lines (58 loc) · 1.47 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
52
53
54
55
56
57
58
59
60
61
62
63
name: Rust
on:
push:
branches: ["main"]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ci.yaml"
pull_request:
branches: ["main"]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ci.yaml"
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- target: linux-amd64
os: ubuntu-latest
cargo_build_target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
env:
CARGO_BUILD_TARGET: ${{ matrix.cargo_build_target }}
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: scripts/build_dist.sh ci-run
test:
runs-on: ubuntu-latest
# Token needed for the integration tests using the gh command line
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
rust-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: r7kamura/rust-problem-matchers@v1
- uses: Swatinem/rust-cache@v2
- name: Run Format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all --all-features -- -D warnings