pointlessly optimize our ossl custom builds (#8432)

This commit is contained in:
Paul Kehrer 2023-03-04 12:34:59 +08:00 committed by GitHub
parent e2d09e269e
commit 10b861206c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -41,6 +41,8 @@ if [[ "${TYPE}" == "openssl" ]]; then
# avoid installing the docs (for performance)
# https://github.com/openssl/openssl/issues/6685#issuecomment-403838728
make install_sw install_ssldirs
# delete binaries we don't need
rm -rf "${OSSL_PATH}/bin"
# For OpenSSL 3.0.0 set up the FIPS config. This does not activate it by
# default, but allows programmatic activation at runtime
if [[ "${VERSION}" =~ ^3. && "${CONFIG_FLAGS}" =~ enable-fips ]]; then
@ -61,6 +63,10 @@ elif [[ "${TYPE}" == "libressl" ]]; then
./config -Wl -Wl,-Bsymbolic-functions -fPIC shared --prefix="${OSSL_PATH}"
shlib_sed
make -j"$(nproc)" install
# delete binaries, libtls, and docs we don't need. can't skip install/compile sadly
rm -rf "${OSSL_PATH}/bin"
rm -rf "${OSSL_PATH}/share"
rm -rf "${OSSL_PATH}/lib/libtls*"
popd
elif [[ "${TYPE}" == "boringssl" ]]; then
git clone https://boringssl.googlesource.com/boringssl
@ -72,6 +78,8 @@ elif [[ "${TYPE}" == "boringssl" ]]; then
cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DRUST_BINDINGS="$(rustc -V --verbose | grep 'host: ' | sed 's/host: //')" -DCMAKE_INSTALL_PREFIX="${OSSL_PATH}"
make -j"$(nproc)"
make install
# delete binaries we don't need
rm -rf "${OSSL_PATH}/bin"
popd
popd
fi

View file

@ -83,12 +83,12 @@ jobs:
- name: Load OpenSSL cache
uses: actions/cache@v3.2.6
id: ossl-cache
timeout-minutes: 5
timeout-minutes: 2
with:
path: ${{ github.workspace }}/osslcache
# When altering the openssl build process you may need to increment the value on the end of this cache key
# so that you can prevent it from fetching the cache and skipping the build step.
key: ${{ matrix.PYTHON.OPENSSL.TYPE }}-${{ matrix.PYTHON.OPENSSL.VERSION }}-${{ env.CONFIG_HASH }}-6
key: ${{ matrix.PYTHON.OPENSSL.TYPE }}-${{ matrix.PYTHON.OPENSSL.VERSION }}-${{ env.CONFIG_HASH }}-8
if: matrix.PYTHON.OPENSSL
- name: Build custom OpenSSL/LibreSSL
run: .github/workflows/build_openssl.sh