Skip to content

Commit 2254a4e

Browse files
committed
Merge branch 'main' into rlamb/tracing-hook
2 parents ea9bae5 + c9a6b17 commit 2254a4e

File tree

78 files changed

+5369
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5369
-75
lines changed

.github/actions/ci/action.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ inputs:
2929
description: 'Whether to run ./build-release-windows.sh for the CMake target'
3030
required: false
3131
default: 'false'
32+
use_curl:
33+
description: 'Whether to enable CURL networking (LD_CURL_NETWORKING=ON)'
34+
required: false
35+
default: 'false'
36+
install_curl:
37+
description: 'Whether to install CURL development libraries. Required for OpenTelemetry builds (server-sdk-otel), but does not enable CURL networking for the SDK itself.'
38+
required: false
39+
default: 'false'
3240

3341
runs:
3442
using: composite
@@ -44,22 +52,30 @@ runs:
4452
- name: Install OpenSSL
4553
uses: ./.github/actions/install-openssl
4654
id: install-openssl
55+
- name: Install CURL
56+
if: inputs.use_curl == 'true' || inputs.install_curl == 'true'
57+
uses: ./.github/actions/install-curl
58+
id: install-curl
4759
- name: Build Library
4860
shell: bash
49-
run: ./scripts/build.sh ${{ inputs.cmake_target }} ON
61+
run: ./scripts/build.sh ${{ inputs.cmake_target }} ON ${{ inputs.use_curl }}
5062
env:
5163
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
5264
Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }}
5365
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
66+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
67+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}
5468
- name: Build Tests
5569
id: build-tests
5670
if: inputs.run_tests == 'true'
5771
shell: bash
58-
run: ./scripts/build.sh gtest_${{ inputs.cmake_target }} ON
72+
run: ./scripts/build.sh gtest_${{ inputs.cmake_target }} ON ${{ inputs.use_curl }}
5973
env:
6074
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
6175
Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }}
6276
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
77+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
78+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}
6379
- name: Run Tests
6480
if: steps.build-tests.outcome == 'success'
6581
shell: bash
@@ -70,16 +86,30 @@ runs:
7086
- name: Simulate Release (Linux/MacOS)
7187
if: inputs.simulate_release == 'true'
7288
shell: bash
73-
run: ./scripts/build-release.sh ${{ inputs.cmake_target }}
89+
run: |
90+
if [ "${{ inputs.use_curl }}" == "true" ]; then
91+
./scripts/build-release.sh ${{ inputs.cmake_target }} --with-curl
92+
else
93+
./scripts/build-release.sh ${{ inputs.cmake_target }}
94+
fi
7495
env:
7596
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
7697
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
98+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
99+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}
77100

78101
- name: Simulate Release (Windows)
79102
if: inputs.simulate_windows_release == 'true'
80103
shell: bash
81-
run: ./scripts/build-release-windows.sh ${{ inputs.cmake_target }}
104+
run: |
105+
if [ "${{ inputs.use_curl }}" == "true" ]; then
106+
./scripts/build-release-windows.sh ${{ inputs.cmake_target }} --with-curl
107+
else
108+
./scripts/build-release-windows.sh ${{ inputs.cmake_target }}
109+
fi
82110
env:
83111
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
84112
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
85113
Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0'
114+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
115+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}

.github/actions/cmake-test/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
toolset:
1212
description: 'Boost toolset'
1313
required: false
14+
cmake_extra_args:
15+
description: 'Extra arguments to pass to CMake'
16+
required: false
17+
default: ''
1418

1519
runs:
1620
using: composite
@@ -36,6 +40,7 @@ runs:
3640
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
3741
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
3842
CMAKE_INSTALL_PREFIX: ../LAUNCHDARKLY_INSTALL
43+
CMAKE_EXTRA_ARGS: ${{ inputs.cmake_extra_args }}
3944
- name: Build the SDK
4045
shell: bash
4146
run: |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Install CURL
2+
description: 'Install CURL development libraries for all platforms.'
3+
4+
outputs:
5+
CURL_ROOT:
6+
description: The location of the installed CURL.
7+
value: ${{ steps.determine-root.outputs.CURL_ROOT }}
8+
9+
runs:
10+
using: composite
11+
steps:
12+
# Linux: Install via apt-get
13+
- name: Install CURL for Ubuntu
14+
if: runner.os == 'Linux'
15+
id: apt-action
16+
shell: bash
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y libcurl4-openssl-dev
20+
echo "CURL_ROOT=/usr" >> $GITHUB_OUTPUT
21+
22+
# macOS: Install via homebrew
23+
- name: Install CURL for macOS
24+
if: runner.os == 'macOS'
25+
id: brew-action
26+
shell: bash
27+
run: |
28+
brew install curl
29+
echo "CURL_ROOT=$(brew --prefix curl)" >> $GITHUB_OUTPUT
30+
31+
# Windows: Build CURL from source with MSVC using helper script
32+
- name: Install CURL for Windows
33+
if: runner.os == 'Windows'
34+
id: windows-action
35+
shell: pwsh
36+
run: |
37+
# Use the build script from the repository
38+
& "${{ github.workspace }}\scripts\build-curl-windows.ps1" -Version "8.11.1" -InstallPrefix "C:\curl-install"
39+
40+
if ($LASTEXITCODE -ne 0) {
41+
Write-Error "CURL build failed"
42+
exit 1
43+
}
44+
45+
echo "CURL_ROOT=C:\curl-install" >> $env:GITHUB_OUTPUT
46+
47+
- name: Determine root
48+
id: determine-root
49+
shell: bash
50+
run: |
51+
if [ ! -z "$ROOT_APT" ]; then
52+
echo "CURL_ROOT=$ROOT_APT" >> $GITHUB_OUTPUT
53+
echo Setting CURL_ROOT to "$ROOT_APT"
54+
elif [ ! -z "$ROOT_BREW" ]; then
55+
echo "CURL_ROOT=$ROOT_BREW" >> $GITHUB_OUTPUT
56+
echo Setting CURL_ROOT to "$ROOT_BREW"
57+
elif [ ! -z "$ROOT_WINDOWS" ]; then
58+
echo "CURL_ROOT=$ROOT_WINDOWS" >> $GITHUB_OUTPUT
59+
echo Setting CURL_ROOT to "$ROOT_WINDOWS"
60+
fi
61+
env:
62+
ROOT_APT: ${{ steps.apt-action.outputs.CURL_ROOT }}
63+
ROOT_BREW: ${{ steps.brew-action.outputs.CURL_ROOT }}
64+
ROOT_WINDOWS: ${{ steps.windows-action.outputs.CURL_ROOT }}

0 commit comments

Comments
 (0)