forked from rustls/rcgen
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (96 loc) · 2.75 KB
/
ci.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: ci
on:
push:
pull_request:
merge_group:
schedule:
- cron: '0 18 * * *'
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-features
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
- run: vcpkg install openssl:x64-windows-static-md
- name: Run cargo check --all
run: cargo check --all
- name: Run the tests
run: cargo test --all
- name: Run the tests with x509-parser enabled
run: cargo test --verbose --features x509-parser
- name: Run cargo doc
run: cargo doc --all --all-features
build:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
toolchain: [stable, beta, nightly, stable 7 months ago]
exclude:
- os: macOS-latest
toolchain: beta
- os: macOS-latest
toolchain: nightly
- os: macOS-latest
toolchain: stable 7 months ago
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Run cargo check --all
run: cargo check --all
- name: Run the tests
run: cargo test --all
- name: Run the tests with x509-parser enabled
run: cargo test --verbose --features x509-parser
- name: Run cargo doc
run: cargo doc --all --all-features
coverage:
name: Measure coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools
- name: Measure coverage
run: cargo llvm-cov --all-features --lcov --output-path ./lcov.info
- name: Report to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
fail_ci_if_error: false
verbose: true