67
67
matrix :
68
68
thing :
69
69
- stable
70
- - macos-x86_64
71
70
- arm-android
72
71
- arm64-android
73
72
- i686-android
@@ -78,72 +77,99 @@ jobs:
78
77
- i686-linux
79
78
- arm-linux
80
79
- aarch64-linux
81
- - x86_64-musl
82
- - x86_64-mingw
80
+ - arm64-macos
81
+ - x86_64-macos
83
82
- i686-msvc
84
83
- x86_64-msvc
85
84
include :
85
+ - check_only : false
86
+ - extra_test_args : ' '
87
+ - apt_packages : ' '
88
+ - custom_env : {}
86
89
- thing : stable
87
90
target : x86_64-unknown-linux-gnu
88
91
rust : stable
89
92
os : ubuntu-latest
90
- - thing : macos-x86_64
91
- target : x86_64-apple-darwin
92
- rust : stable
93
- os : macos-latest
94
93
- thing : arm-android
95
- target : arm -linux-androideabi
94
+ target : armv7 -linux-androideabi
96
95
rust : stable
97
96
os : ubuntu-latest
97
+ check_only : true
98
98
- thing : arm64-android
99
99
target : aarch64-linux-android
100
100
rust : stable
101
101
os : ubuntu-latest
102
+ check_only : true
102
103
- thing : i686-android
103
104
target : i686-linux-android
104
105
rust : stable
105
106
os : ubuntu-latest
107
+ check_only : true
106
108
- thing : x86_64-android
107
109
target : x86_64-linux-android
108
110
rust : stable
109
111
os : ubuntu-latest
112
+ check_only : true
110
113
- thing : aarch64-ios
111
114
target : aarch64-apple-ios
112
115
os : macos-latest
116
+ check_only : true
117
+ # It's... theoretically possible to run tests on iPhone Simulator,
118
+ # but for now, make sure that BoringSSL only builds.
113
119
- thing : aarch64-ios-sim
114
120
target : aarch64-apple-ios-sim
115
121
os : macos-latest
122
+ check_only : true
116
123
- thing : x86_64-ios
117
124
target : x86_64-apple-ios
118
125
os : macos-latest
126
+ check_only : true
119
127
- thing : i686-linux
120
128
target : i686-unknown-linux-gnu
121
129
rust : stable
122
130
os : ubuntu-latest
131
+ apt_packages : gcc-multilib g++-multilib
123
132
- thing : arm-linux
124
133
target : arm-unknown-linux-gnueabi
125
134
rust : stable
126
135
os : ubuntu-latest
136
+ apt_packages : gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
137
+ check_only : true
138
+ custom_env :
139
+ CC : arm-linux-gnueabi-gcc
140
+ CXX : arm-linux-gnueabi-g++
141
+ CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER : arm-linux-gnueabi-g++
127
142
- thing : aarch64-linux
128
143
target : aarch64-unknown-linux-gnu
129
144
rust : stable
130
145
os : ubuntu-latest
131
- - thing : x86_64-musl
132
- target : x86_64-unknown-linux-musl
146
+ apt_packages : crossbuild-essential-arm64
147
+ check_only : true
148
+ custom_env :
149
+ CC : aarch64-linux-gnu-gcc
150
+ CXX : aarch64-linux-gnu-g++
151
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : aarch64-linux-gnu-g++
152
+ - thing : arm64-macos
153
+ target : aarch64-apple-darwin
133
154
rust : stable
134
- os : ubuntu-latest
135
- - thing : x86_64-mingw
136
- target : x86_64-pc-windows-gnu
155
+ os : macos-latest
156
+ check_only : true
157
+ - thing : x86_64-macos
158
+ target : x86_64-apple-darwin
137
159
rust : stable
138
- os : ubuntu -latest
160
+ os : macos -latest
139
161
- thing : i686-msvc
140
162
target : i686-pc-windows-msvc
141
163
rust : stable-x86_64-msvc
142
164
os : windows-latest
165
+ # CI's Windows doesn't have required root certs
166
+ extra_test_args : --workspace --exclude tokio-boring --exclude hyper-boring
143
167
- thing : x86_64-msvc
144
168
target : x86_64-pc-windows-msvc
145
169
rust : stable-x86_64-msvc
146
170
os : windows-latest
171
+ # CI's Windows doesn't have required root certs
172
+ extra_test_args : --workspace --exclude tokio-boring --exclude hyper-boring
147
173
148
174
steps :
149
175
- uses : actions/checkout@v2
@@ -153,6 +179,10 @@ jobs:
153
179
run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
154
180
shell : bash
155
181
- run : rustup target add ${{ matrix.target }}
182
+ - name : Install target-specific APT dependencies
183
+ if : " matrix.apt_packages != ''"
184
+ run : sudo apt update && sudo apt install -y ${{ matrix.apt_packages }}
185
+ shell : bash
156
186
- name : Install nasm
157
187
if : startsWith(matrix.os, 'windows')
158
188
run : choco install nasm
@@ -166,18 +196,20 @@ jobs:
166
196
- name : Set LIBCLANG_PATH
167
197
if : startsWith(matrix.os, 'windows')
168
198
run : echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
169
- - if : " startsWith(matrix.os, 'windows') && !contains(matrix.target, 'ios')"
170
- # CI's Windows doesn't have require root certs
171
- run : cargo test --workspace --exclude tokio-boring --exclude hyper-boring
172
- name : Run tests (Windows)
173
- - if : " !startsWith(matrix.os, 'windows') && !contains(matrix.target, 'ios')"
174
- run : cargo test
175
- name : Run tests (not Windows)
176
- - if : " contains(matrix.target, 'ios')"
177
- # It's... theoretically possible to run tests on iPhone Simulator,
178
- # but for now, make sure that BoringSSL only builds.
179
- run : cargo check --target ${{ matrix.target }} --all-targets
180
- name : Check tests (iOS)
199
+ - name : Set Android Linker path
200
+ if : endsWith(matrix.thing, '-android')
201
+ run : echo "CARGO_TARGET_$(echo ${{ matrix.target }} | tr \\-a-z _A-Z)_LINKER=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/$(echo ${{ matrix.target }} | sed s/armv7/armv7a/)21-clang++" >> "$GITHUB_ENV"
202
+ - if : " !matrix.check_only"
203
+ run : cargo test --target ${{ matrix.target }} ${{ matrix.extra_test_args }}
204
+ name : Run tests
205
+ shell : bash
206
+ env : ${{ matrix.custom_env }}
207
+ - if : matrix.check_only
208
+ # We `build` because we want the linker to verify we are cross-compiling correctly.
209
+ run : cargo build --target ${{ matrix.target }} --tests
210
+ name : Build tests
211
+ shell : bash
212
+ env : ${{ matrix.custom_env }}
181
213
- name : Test boring-sys cargo publish
182
214
# Running `cargo publish --dry-run` tests two things:
183
215
#
0 commit comments