Repository navigation
162 lines (137 loc) · 5 KB
/
Copy pathbuild.yml
File metadata and controls
162 lines (137 loc) · 5 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: build
permissions:
contents: read
on:
push:
branches: ["main", "rel-*", "ci/*"]
tags:
- "**"
pull_request:
merge_group:
schedule:
# Offset from mirror.yml's deploys, which make upki.rustls.dev return 503s
- cron: "54 21 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
- ubuntu-24.04-arm
rustc:
- stable
include:
- os: ubuntu-latest
rustc: nightly
exclude: # and never use macos/windows for merge checks
- os: ${{ github.event_name == 'merge_group' && 'windows-latest' }}
- os: ${{ github.event_name == 'merge_group' && 'macos-latest' }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
submodules: true
persist-credentials: false
- name: Install ${{ matrix.rustc }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rustc }}
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install cargo-c
uses: taiki-e/cache-cargo-install-action@v3
with:
tool: cargo-c
- name: Check all targets
if: matrix.os != 'windows-latest'
run: cargo check --locked --all-features --all-targets
- name: Check all targets (Windows) # Skip upki-openssl on Windows because it requires OpenSSL to be installed
if: matrix.os == 'windows-latest'
run: cargo check --locked -p upki -p rustls-upki -p upki-cli -p upki-mirror -p revoke-test --all-features --all-targets
- name: Run tests (debug)
if: matrix.os != 'windows-latest'
run: cargo test --locked -p upki -p rustls-upki -p upki-cli -p upki-mirror -p revoke-test
- name: Run tests (debug, Windows) # Skip upki-openssl on Windows because it requires OpenSSL to be installed
if: matrix.os == 'windows-latest'
run: cargo test --locked -p revoke-test -p rustls-upki -p upki
- name: Without features
run: cargo check --locked -p upki --no-default-features
- name: CLI without features
run: cargo check --locked -p upki-cli --no-default-features
- name: CLI with native-tls
run: cargo check --locked -p upki-cli --no-default-features --features fetch-native-tls
- name: Build FFI
run: cargo cbuild --locked -p upki
- name: Build OpenSSL integration
if: runner.os != 'Windows'
run: cargo cbuild --locked -p upki-openssl
- name: Run system tests # Select the same packages as the debug tests, so their build is reused
if: matrix.os != 'windows-latest'
run: cargo test --locked -p upki -p rustls-upki -p upki-cli -p upki-mirror -p revoke-test --test system_tests -- --ignored --nocapture
- name: Run system tests (Windows)
if: matrix.os == 'windows-latest'
run: cargo test --locked -p revoke-test -p rustls-upki -p upki --test system_tests -- --ignored --nocapture
ffi-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
persist-credentials: false
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install cargo-c
uses: taiki-e/cache-cargo-install-action@v3
with:
tool: cargo-c
- name: Check upki/ffi-example builds
run: |
mkdir -p dist/ffi
cargo cinstall -p upki --release --prefix=$(realpath dist/ffi)
export PKG_CONFIG_PATH=$(realpath dist/ffi/lib/x86_64-linux-gnu/pkgconfig/)
cd upki/ffi-example
make
./upki-demo || true
valgrind ./upki-demo || true
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
persist-credentials: false
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.85"
- name: Check MSRV
run: cargo check --locked --all-features -p upki -p rustls-upki -p upki-openssl -p upki-cli
test-32-bit: # check for overflow issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
persist-credentials: false
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: i686-unknown-linux-gnu
- name: Install i686 cross toolchain
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: i686-unknown-linux-gnu
- name: Run tests (32-bit)
run: cargo test --locked -p upki