Skip to content

Commit 69ac1c7

Browse files
authored
fix: build with OpenSSL > 3.0 on all platforms (#249)
We were previously using openssl 1.1 on some platforms due to issues with the Github Actions executors. These issues are no longer present, so we can use openssl > 3 instead. - [x] Linux: 3.0.2 - [x] Mac: 3.1.2 - [x] Windows: 3.1.1
1 parent e852966 commit 69ac1c7

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/actions/sdk-release/action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,17 @@ runs:
9292
if: runner.os == 'Windows'
9393
uses: ilammy/msvc-dev-cmd@v1
9494

95+
- name: Upgrade OpenSSL
96+
if: runner.os == 'Windows'
97+
shell: bash
98+
run: |
99+
choco upgrade openssl --no-progress
100+
95101
- name: Build Windows Artifacts
96102
if: runner.os == 'Windows'
97103
shell: bash
98104
env:
99-
OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL'
105+
OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL-Win64'
100106
BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
101107
BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
102108
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
@@ -155,9 +161,8 @@ runs:
155161
if: runner.os == 'macOS'
156162
shell: bash
157163
run: |
158-
brew link --overwrite [email protected]
159-
echo "OPENSSL_ROOT_DIR=$(brew --prefix [email protected])" >> "$GITHUB_ENV"
160-
export OPENSSL_ROOT_DIR=$(brew --prefix [email protected])
164+
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
165+
export OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)
161166
162167
./scripts/build-release.sh ${{ inputs.sdk_cmake_target }}
163168
env:

.github/workflows/client.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ jobs:
4141
runs-on: macos-12
4242
steps:
4343
- run: |
44-
brew link --overwrite [email protected]
45-
echo "OPENSSL_ROOT_DIR=$(brew --prefix [email protected])" >> "$GITHUB_ENV"
44+
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
4645
# For debugging
47-
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)"
46+
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)"
4847
- uses: actions/checkout@v3
4948
- uses: ./.github/actions/ci
5049
env:
@@ -55,11 +54,15 @@ jobs:
5554
build-test-windows:
5655
runs-on: windows-2022
5756
steps:
57+
- name: Upgrade OpenSSL
58+
shell: bash
59+
run: |
60+
choco upgrade openssl --no-progress
5861
- uses: actions/checkout@v3
5962
- uses: ilammy/msvc-dev-cmd@v1
6063
- uses: ./.github/actions/ci
6164
env:
62-
OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL'
65+
OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL-Win64'
6366
BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
6467
BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
6568
with:

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ if (BUILD_TESTING)
5454
endif ()
5555

5656
set(OPENSSL_USE_STATIC_LIBS ON)
57-
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/[email protected]")
5857
find_package(OpenSSL REQUIRED)
5958
message(STATUS "LaunchDarkly: using OpenSSL v${OPENSSL_VERSION}")
6059

0 commit comments

Comments
 (0)