@@ -153,7 +153,7 @@ jobs:
153
153
- false
154
154
library :
155
155
- name : boringssl
156
- version : 5697a9202615925696f8dc7f4e286d44d474769e
156
+ version : 93e8d4463d59d671e9c5c6171226341f04b07907
157
157
- name : openssl
158
158
version : vendored
159
159
- name : openssl
@@ -215,10 +215,6 @@ jobs:
215
215
library :
216
216
name : libressl
217
217
version : 3.7.0
218
- exclude :
219
- - library :
220
- name : boringssl
221
- bindgen : true
222
218
name : ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ matrix.bindgen }}
223
219
runs-on : ubuntu-latest
224
220
env :
@@ -311,24 +307,34 @@ jobs:
311
307
make install_sw
312
308
;;
313
309
"boringssl")
314
- sed -i rust/CMakeLists.txt -e '1s%^%include_directories(../include)\n%'
315
- cpu=`echo ${{ matrix.target }} | cut -d - -f 1`
310
+ mkdir build
311
+ cd build
312
+
316
313
echo "set(CMAKE_SYSTEM_NAME Linux)" > toolchain.cmake
317
314
echo "set(CMAKE_SYSTEM_PROCESSOR $cpu)" >> toolchain.cmake
318
315
echo "set(triple ${{ matrix.target }})" >> toolchain.cmake
319
316
echo 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} '$OS_FLAGS '" CACHE STRING "c++ flags")' >> toolchain.cmake
320
317
echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} '$OS_FLAGS '" CACHE STRING "c flags")' >> toolchain.cmake
321
318
echo 'set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} '$OS_FLAGS '" CACHE STRING "asm flags")' >> toolchain.cmake
322
- cmake -DRUST_BINDINGS="${{ matrix.target }}" -B $OPENSSL_DIR -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
323
- make -C $OPENSSL_DIR
319
+
320
+ cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DRUST_BINDINGS="${{ matrix.target }}" -DCMAKE_INSTALL_PREFIX="${OPENSSL_DIR}" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
321
+ make -j "$(nproc)"
322
+ make install
323
+
324
+ # Copy stuff around so it's all as the build system expects.
325
+ cp -r rust/ "$OPENSSL_DIR/rust"
326
+ mkdir -p "$OPENSSL_DIR/crypto/"
327
+ mkdir -p "$OPENSSL_DIR/ssl/"
328
+ cp "$OPENSSL_DIR/lib/libcrypto.a" "$OPENSSL_DIR/crypto/"
329
+ cp "$OPENSSL_DIR/lib/libssl.a" "$OPENSSL_DIR/ssl/"
324
330
esac
325
331
326
332
if : matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit
327
333
- run : |
328
334
mkdir -p .cargo
329
335
echo '[patch.crates-io]' > .cargo/config.toml
330
336
echo 'bssl-sys = { path = "'$OPENSSL_DIR'/rust" }' >> .cargo/config.toml
331
- if: matrix.library.name == 'boringssl'
337
+ if: matrix.library.name == 'boringssl' && !matrix.bindgen
332
338
- uses : actions/cache@v3
333
339
with :
334
340
path : ~/.cargo/registry/index
@@ -350,21 +356,25 @@ jobs:
350
356
if [[ "${{ matrix.library.version }}" == "vendored" ]]; then
351
357
features="--features vendored"
352
358
fi
353
- if [[ "${{ matrix.bindgen }}" == "true" ]]; then
359
+ if [[ "${{ matrix.bindgen }}" == "true" && "${{ matrix.library.name }}" != "boringssl" ]]; then
354
360
features="$features --features bindgen"
355
361
fi
356
362
cargo run --manifest-path=systest/Cargo.toml --target ${{ matrix.target }} $features
357
363
if : matrix.library.name != 'boringssl'
358
364
- name : Test openssl
359
365
run : |
360
- if [[ "${{ matrix.library.name }}" == "boringssl" ]]; then
361
- features="--features unstable_boringssl"
362
- fi
363
- if [[ "${{ matrix.library.version }}" == "vendored" ]]; then
364
- features="--features vendored"
365
- fi
366
- if [[ "${{ matrix.bindgen }}" == "true" ]]; then
367
- features="$features --features bindgen"
366
+ if [[ "${{ matrix.library.name }}" == "boringssl" && "${{ matrix.bindgen }}" == "true" ]]; then
367
+ features="--features unstable_boringssl_bindgen"
368
+ else
369
+ if [[ "${{ matrix.library.name }}" == "boringssl" ]]; then
370
+ features="--features unstable_boringssl"
371
+ fi
372
+ if [[ "${{ matrix.library.version }}" == "vendored" ]]; then
373
+ features="--features vendored"
374
+ fi
375
+ if [[ "${{ matrix.bindgen }}" == "true" ]]; then
376
+ features="$features --features bindgen"
377
+ fi
368
378
fi
369
379
cargo test --manifest-path=openssl/Cargo.toml --target ${{ matrix.target }} $features
370
380
- name : Test openssl-errors
0 commit comments