@@ -15,188 +15,68 @@ defaults:
15
15
working-directory : rustls-libssl
16
16
17
17
jobs :
18
- build :
19
- name : Build+test
20
- runs-on : ${{ matrix.os }}
18
+ release_packages :
19
+ name : Produce release packages
20
+ runs-on : ubuntu-latest
21
+ container : ${{ matrix.container }}:${{ matrix.version }}
21
22
strategy :
22
23
matrix :
23
- rust :
24
- - stable
25
- - beta
26
- - nightly
27
- # TODO(XXX): consider replacing ubuntu-24.04 w/ ubuntu-latest when appropriate
28
- os : [ubuntu-24.04, ubuntu-22.04]
29
- steps :
30
- - name : Checkout sources
31
- uses : actions/checkout@v4
32
- with :
33
- persist-credentials : false
34
-
35
- - name : Install build dependencies
36
- run : sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld
24
+ include :
25
+ - container : fedora
26
+ version : 40
27
+ package : rpm
28
+ # - container: ubuntu
29
+ # version: 24.04
30
+ # package: deb
31
+ # - container: ubuntu
32
+ # version: 22.04
33
+ # package: deb
37
34
38
- - name : Install ${{ matrix.rust }} toolchain
39
- uses : dtolnay/rust-toolchain@master
40
- with :
41
- toolchain : ${{ matrix.rust }}
42
-
43
- - run : make PROFILE=debug test
44
- - run : make PROFILE=debug integration
45
- # Note: we only check the client/server binaries here, assuming that
46
- # is sufficient for any other test binaries.
47
- - name : Verify debug builds were using ASAN
48
- run : |
49
- nm target/client | grep '__asan_init'
50
- nm target/server | grep '__asan_init'
51
- - name : Build release binaries
52
- run : |
53
- make clean
54
- make PROFILE=release
55
- - name : Verify release builds were not using ASAN
56
- run : |
57
- nm target/client | grep -v '__asan_init'
58
- nm target/server | grep -v '__asan_init'
59
-
60
- valgrind :
61
- name : Valgrind
62
- runs-on : ubuntu-latest
63
35
steps :
64
- - uses : actions/checkout@v4
65
- with :
66
- persist-credentials : false
67
- - name : Install rust toolchain
68
- uses : dtolnay/rust-toolchain@stable
69
- - name : Install valgrind
70
- run : sudo apt-get update && sudo apt-get install -y valgrind
71
- - name : Install build dependencies
72
- run : sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld
73
- - run : VALGRIND="valgrind -q" make PROFILE=release test integration
74
-
75
- docs :
76
- name : Check for documentation errors
77
- runs-on : ubuntu-latest
78
- steps :
79
- - name : Checkout sources
80
- uses : actions/checkout@v4
81
- with :
82
- persist-credentials : false
83
-
84
- - name : Install build dependencies
85
- run : sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld
86
-
87
- - name : Install rust toolchain
88
- uses : dtolnay/rust-toolchain@nightly
36
+ - name : Install prerequisites (debian-like)
37
+ if : matrix.package == 'deb'
38
+ working-directory : /
39
+ run : |
40
+ apt-get update
41
+ apt-get install -y curl build-essential git
89
42
90
- - name : cargo doc (all features)
91
- run : cargo doc --all-features --no-deps --workspace
92
- env :
93
- RUSTDOCFLAGS : -Dwarnings
43
+ - name : Install prerequisites (fedora-like)
44
+ if : matrix.package == 'rpm'
45
+ working-directory : /
46
+ run : |
47
+ yum install -y curl make automake gcc gcc-c++ kernel-devel
94
48
95
- format :
96
- name : Format
97
- runs-on : ubuntu-latest
98
- steps :
99
49
- name : Checkout sources
100
50
uses : actions/checkout@v4
101
51
with :
102
52
persist-credentials : false
103
- - name : Install rust toolchain
104
- uses : dtolnay/rust-toolchain@stable
105
- with :
106
- components : rustfmt
107
- - name : Check Rust formatting
108
- run : cargo fmt --all -- --check
109
- - name : Check src/entry.rs formatting
110
- run : ./admin/format --all -- --check
111
- - name : Check C formatting
112
- run : make format-check
113
- - name : Check ordering of build.rs entrypoints
114
- run : ./admin/sort-entrypoints.py
115
- - name : Check MATRIX.md is up-to-date
116
- run : ./admin/matrix.py > MATRIX.md.new && diff -su MATRIX.md MATRIX.md.new
117
53
118
- clippy :
119
- name : Clippy
120
- runs-on : ubuntu-latest
121
- steps :
122
- - name : Checkout sources
123
- uses : actions/checkout@v4
124
- with :
125
- persist-credentials : false
126
- - name : Install rust toolchain
54
+ - name : Install stable rust toolchain
127
55
uses : dtolnay/rust-toolchain@stable
128
- with :
129
- components : clippy
130
- - name : Check clippy
131
- # We allow unknown lints here because sometimes the nightly job
132
- # (below) will have a new lint that we want to suppress.
133
- # If we suppress (e.g. #![allow(clippy::arc_with_non_send_sync)]),
134
- # we would get an unknown-lint error from older clippy versions.
135
- run : cargo clippy --locked --workspace --all-targets -- -D warnings -A unknown-lints
136
-
137
- clippy-nightly-optional :
138
- name : Clippy nightly (optional)
139
- runs-on : ubuntu-latest
140
- steps :
141
- - name : Checkout sources
142
- uses : actions/checkout@v4
143
- with :
144
- persist-credentials : false
145
- - name : Install rust toolchain
146
- uses : dtolnay/rust-toolchain@nightly
147
- with :
148
- components : clippy
149
- - name : Check clippy
150
- run : cargo clippy --locked --workspace --all-targets -- -D warnings
151
56
152
- clang-tidy :
153
- name : Clang Tidy
154
- runs-on : ubuntu-latest
155
- steps :
156
- - name : Checkout sources
157
- uses : actions/checkout@v4
158
- with :
159
- persist-credentials : false
160
- - name : Clang tidy
161
- run : clang-tidy tests/*.c -- -I src/
162
-
163
- miri :
164
- name : Miri
165
- runs-on : ubuntu-latest
166
- steps :
167
- - name : Checkout sources
168
- uses : actions/checkout@v4
169
- with :
170
- persist-credentials : false
171
-
172
- - name : Install nightly Rust
173
- uses : dtolnay/rust-toolchain@nightly
174
- - run : rustup override set "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)"
175
- - run : rustup component add miri
176
- - run : cargo miri test
177
-
178
- packaging :
179
- name : Packaging
180
- runs-on : ubuntu-latest
181
- steps :
182
- - name : Checkout sources
183
- uses : actions/checkout@v4
184
- with :
185
- persist-credentials : false
186
-
187
- - name : Install build dependencies
188
- run : sudo apt-get update && sudo apt-get install -y openssl libssl3 libssl-dev lld
189
-
190
- - name : Install cargo-get
191
- run : cargo install cargo-get
57
+ - name : Install build dependencies (debian-like)
58
+ if : matrix.package == 'deb'
59
+ run : |
60
+ apt-get update
61
+ apt-get install -y openssl libssl3 libssl-dev lld golang-go
62
+ cargo install cargo-get
63
+ go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
192
64
193
- - name : Install nfpm
65
+ - name : Install build dependencies (fedora-like)
66
+ if : matrix.package == 'rpm'
194
67
run : |
68
+ apt-get update
69
+ apt-get install -y openssl openssl-devel lld go
70
+ cargo install cargo-get
195
71
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
196
- echo PATH=$PATH:$HOME/go/bin >> $GITHUB_ENV
197
72
198
- - name : Build packages
199
- run : make package PROFILE=release
73
+ - name : Build package
74
+ run : |
75
+ make package-${{ matrix.package }} PROFILE=release NFPM=$HOME/go/bin/nfpm
200
76
201
- - name : Test packages
202
- run : make test-package PROFILE=release
77
+ - name : Archive package
78
+ uses : actions/upload-artifact@v4
79
+ with :
80
+ name : ${{ matrix.package }} package built on ${{ matrix.container }} ${{ matrix.version }}
81
+ path : rustls-libssl/target/dist/*.${{ matrix.package }}
82
+ if-no-files-found : error
0 commit comments