-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (45 loc) · 1.34 KB
/
build.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
46
47
48
49
50
51
52
53
54
55
56
57
name: "Build"
env:
RUST_VERSION: "stable 6 months ago"
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
checks:
name: Run checks
strategy:
fail-fast: false
matrix:
os: [anoncreds-ubuntu-latest, macos-latest, anoncreds-windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Cache cargo resources
uses: Swatinem/rust-cache@v2
with:
shared-key: deps
cache-on-failure: true
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo check
run: cargo check --workspace --features openssl_vendored
- name: Debug build
run: cargo build --all-targets --features openssl_vendored
- name: Run tests
run: cargo test --workspace --features openssl_vendored
env:
RUST_BACKTRACE: full
- name: Run tests (native backend)
run: cargo test --workspace --no-default-features --features serde
env:
RUST_BACKTRACE: full
- name: Release build
run: cargo build --release --all-targets --features openssl_vendored