-
-
Notifications
You must be signed in to change notification settings - Fork 12
68 lines (58 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
68 lines (58 loc) · 2.09 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
64
65
66
67
68
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * 0"
jobs:
build:
name: "Build for ${{ matrix.config.TARGET }} using Rust ${{ matrix.TOOLCHAIN }} (on ${{ matrix.config.OS }}) [args: ${{ matrix.BUILD_ARGS }}]"
runs-on: ${{ matrix.config.OS }}
strategy:
fail-fast: false
matrix:
config:
- { OS: ubuntu-latest, TARGET: "x86_64-unknown-linux-gnu" }
- { OS: ubuntu-latest, TARGET: "x86_64-unknown-linux-musl" }
- { OS: ubuntu-latest, TARGET: "armv7-unknown-linux-gnueabihf" }
- { OS: ubuntu-latest, TARGET: "aarch64-unknown-linux-gnu" }
- { OS: ubuntu-latest, TARGET: "aarch64-unknown-linux-musl" }
- { OS: ubuntu-latest, TARGET: "x86_64-pc-windows-gnu" }
- { OS: macos-latest, TARGET: "x86_64-apple-darwin" }
- { OS: macos-latest, TARGET: "aarch64-apple-darwin" }
- { OS: windows-latest, TARGET: "x86_64-pc-windows-msvc" }
TOOLCHAIN: [ stable ]
BUILD_ARGS: [ "", "--features use-native-certs" ]
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.TOOLCHAIN }}
target: ${{ matrix.config.TARGET }}
components: rustfmt, clippy
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Install cross
uses: taiki-e/install-action@cross
- name: Build
run: cross build --target ${{ matrix.config.TARGET }} ${{ matrix.BUILD_ARGS }}
- name: Check formatting
run: cargo fmt -- --check --verbose
- name: Check lints
run: cargo clippy --tests --verbose -- -D warnings
audit:
name: Perform audit for security
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Run cargo-audit
uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}