-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (34 loc) · 1.25 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
container:
image: rust:1.81-alpine3.20
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 #v4.2.0
- name: Install deps
run: |
apk add --no-cache pcsc-lite-dev # For pcsc dependency
apk add --no-cache musl-dev # For tracing-attributes dependency (needs crti.o)
apk add --no-cache pkgconf openssl-dev openssl-libs-static gcc make perl-dev # For openssl dependency (see https://github.com/Fethbita/emrtd/pull/3, https://github.com/rust-lang/docker-rust/issues/167)
# cargo install --version 0.20.1 cargo-audit # For audit step
# cargo install --version 0.15.1 cargo-msrv # For latest supported rust version
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test --all-features --verbose
- name: Audit
run: cargo audit
- name: Check rust version in Cargo.toml
run: cargo msrv verify -- cargo check --all-features --tests
- name: Lint
run: cargo clippy -- -D warnings
- name: Build release
run: cargo build --release --verbose