Skip to content

Commit f150dc1

Browse files
authored
fix CI to work with ubuntu 22.04 (#7950)
1 parent 8867724 commit f150dc1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/build_openssl.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ shlib_sed() {
99
sed -i "s/^SHLIB_MINOR=.*/SHLIB_MINOR=0.0/" Makefile
1010
sed -i "s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=100.0.0/" Makefile
1111
}
12+
shlib_sed_3() {
13+
# OpenSSL 3 changes how it does the shlib versioning
14+
sed -i "s/^SHLIB_VERSION=.*/SHLIB_VERSION=100/" VERSION.dat
15+
}
1216

1317
if [[ "${TYPE}" == "openssl" ]]; then
1418
if [[ "${VERSION}" =~ ^[0-9a-f]{40}$ ]]; then
@@ -20,9 +24,18 @@ if [[ "${TYPE}" == "openssl" ]]; then
2024
tar zxf "openssl-${VERSION}.tar.gz"
2125
pushd "openssl-${VERSION}"
2226
fi
27+
# For OpenSSL 3 we need to call this before config
28+
if [[ "${VERSION}" =~ ^3. ]] || [[ "${VERSION}" =~ ^[0-9a-f]{40}$ ]]; then
29+
shlib_sed_3
30+
fi
31+
2332
# CONFIG_FLAGS is a global coming from a previous step
2433
./config ${CONFIG_FLAGS} -fPIC --prefix="${OSSL_PATH}"
25-
shlib_sed
34+
35+
# For OpenSSL 1 we need to call this after config
36+
if [[ "${VERSION}" =~ ^1. ]]; then
37+
shlib_sed
38+
fi
2639
make depend
2740
make -j"$(nproc)"
2841
# avoid installing the docs (for performance)

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818

1919
jobs:
2020
linux:
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-latest
2222
strategy:
2323
fail-fast: false
2424
matrix:
@@ -67,7 +67,7 @@ jobs:
6767
~/.cargo/registry/src/
6868
~/.cargo/git/db/
6969
src/rust/target/
70-
key: ${{ runner.os }}-${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-cargo-3-${{ hashFiles('**/Cargo.lock') }}
70+
key: ${{ runner.os }}-${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-cargo-5-${{ hashFiles('**/Cargo.lock') }}
7171

7272
- uses: actions/[email protected]
7373
timeout-minutes: 3
@@ -96,7 +96,7 @@ jobs:
9696
path: ${{ github.workspace }}/osslcache
9797
# When altering the openssl build process you may need to increment the value on the end of this cache key
9898
# so that you can prevent it from fetching the cache and skipping the build step.
99-
key: ${{ matrix.PYTHON.OPENSSL.TYPE }}-${{ matrix.PYTHON.OPENSSL.VERSION }}-${{ env.CONFIG_HASH }}-2
99+
key: ${{ matrix.PYTHON.OPENSSL.TYPE }}-${{ matrix.PYTHON.OPENSSL.VERSION }}-${{ env.CONFIG_HASH }}-4
100100
if: matrix.PYTHON.OPENSSL
101101
- name: Build custom OpenSSL/LibreSSL
102102
run: .github/workflows/build_openssl.sh

0 commit comments

Comments
 (0)