-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add support for CURL networking. #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f22d157
8ef277b
8204d2a
6351b59
f5d3b31
7c2ca08
069edf1
9152599
ac66ddc
22b258d
94b520c
e8e6b91
531c805
bdf1c4b
df91388
24b2629
fd3bd44
9fa7cce
1ee9e1d
04a8cf8
543e450
5a5b8b9
7f03df2
1b295c5
5573c5f
71fa311
c60a03b
0235834
a870f03
832183e
1c64987
3da9112
bb5cba3
b860b2b
428af22
b8b7f53
7f8f1ce
c8ed14e
3363838
9e625df
ef61eeb
0e57e52
5ab043e
eaca3a0
9fffe56
a42b4a3
1a76752
e42aa31
d1cfb47
816064e
ae52c2c
f7a2490
185d668
b3cb350
602f48f
273fce4
6253672
3597de5
2a49349
f378303
e7622d0
6b8d925
27a498f
09ba09d
6223137
fce4996
9892c7b
87c0fbc
67a782d
f330e97
ff3a07b
2ca2763
d54c973
0dfe280
e7f6564
e708abd
ca6f43e
d3b18cd
0c2cbfe
583341e
fd469e0
e3965f9
8fdc421
23ebda3
7502d88
417b1de
3782ee9
12a7783
a80d0a5
93c498a
8ee6a0d
b3e35ba
718f7be
75c79b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,10 @@ inputs: | |
| description: 'Whether to run ./build-release-windows.sh for the CMake target' | ||
| required: false | ||
| default: 'false' | ||
| use_curl: | ||
| description: 'Whether to enable CURL networking (LD_CURL_NETWORKING=ON)' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: composite | ||
|
|
@@ -44,22 +48,30 @@ runs: | |
| - name: Install OpenSSL | ||
| uses: ./.github/actions/install-openssl | ||
| id: install-openssl | ||
| - name: Install CURL | ||
| if: inputs.use_curl == 'true' | ||
| uses: ./.github/actions/install-curl | ||
| id: install-curl | ||
| - name: Build Library | ||
| shell: bash | ||
| run: ./scripts/build.sh ${{ inputs.cmake_target }} ON | ||
| run: ./scripts/build.sh ${{ inputs.cmake_target }} ON ${{ inputs.use_curl }} | ||
| env: | ||
| BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
| Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} | ||
| OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} | ||
| CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Conditional CURL Installation Causes Environment Variable IssuesThe |
||
| - name: Build Tests | ||
| id: build-tests | ||
| if: inputs.run_tests == 'true' | ||
| shell: bash | ||
| run: ./scripts/build.sh gtest_${{ inputs.cmake_target }} ON | ||
| run: ./scripts/build.sh gtest_${{ inputs.cmake_target }} ON ${{ inputs.use_curl }} | ||
| env: | ||
| BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
| Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} | ||
| OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} | ||
| CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| - name: Run Tests | ||
| if: steps.build-tests.outcome == 'success' | ||
| shell: bash | ||
|
|
@@ -70,16 +82,30 @@ runs: | |
| - name: Simulate Release (Linux/MacOS) | ||
| if: inputs.simulate_release == 'true' | ||
| shell: bash | ||
| run: ./scripts/build-release.sh ${{ inputs.cmake_target }} | ||
| run: | | ||
| if [ "${{ inputs.use_curl }}" == "true" ]; then | ||
| ./scripts/build-release.sh ${{ inputs.cmake_target }} --with-curl | ||
| else | ||
| ./scripts/build-release.sh ${{ inputs.cmake_target }} | ||
| fi | ||
| env: | ||
| BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
| OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} | ||
| CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
|
|
||
| - name: Simulate Release (Windows) | ||
| if: inputs.simulate_windows_release == 'true' | ||
| shell: bash | ||
| run: ./scripts/build-release-windows.sh ${{ inputs.cmake_target }} | ||
| run: | | ||
| if [ "${{ inputs.use_curl }}" == "true" ]; then | ||
| ./scripts/build-release-windows.sh ${{ inputs.cmake_target }} --with-curl | ||
| else | ||
| ./scripts/build-release-windows.sh ${{ inputs.cmake_target }} | ||
| fi | ||
| env: | ||
| BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
| OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} | ||
| Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' | ||
| CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Install CURL | ||
| description: 'Install CURL development libraries for all platforms.' | ||
|
|
||
| outputs: | ||
| CURL_ROOT: | ||
| description: The location of the installed CURL. | ||
| value: ${{ steps.determine-root.outputs.CURL_ROOT }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| # Linux: Install via apt-get | ||
| - name: Install CURL for Ubuntu | ||
| if: runner.os == 'Linux' | ||
| id: apt-action | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libcurl4-openssl-dev | ||
| echo "CURL_ROOT=/usr" >> $GITHUB_OUTPUT | ||
|
|
||
| # macOS: Install via homebrew | ||
| - name: Install CURL for macOS | ||
| if: runner.os == 'macOS' | ||
| id: brew-action | ||
| shell: bash | ||
| run: | | ||
| brew install curl | ||
| echo "CURL_ROOT=$(brew --prefix curl)" >> $GITHUB_OUTPUT | ||
|
|
||
| # Windows: Build CURL from source with MSVC using helper script | ||
| - name: Install CURL for Windows | ||
| if: runner.os == 'Windows' | ||
| id: windows-action | ||
| shell: pwsh | ||
| run: | | ||
| # Use the build script from the repository | ||
| & "${{ github.workspace }}\scripts\build-curl-windows.ps1" -Version "8.11.1" -InstallPrefix "C:\curl-install" | ||
|
|
||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "CURL build failed" | ||
| exit 1 | ||
| } | ||
|
|
||
| echo "CURL_ROOT=C:\curl-install" >> $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Determine root | ||
| id: determine-root | ||
| shell: bash | ||
| run: | | ||
| if [ ! -z "$ROOT_APT" ]; then | ||
| echo "CURL_ROOT=$ROOT_APT" >> $GITHUB_OUTPUT | ||
| echo Setting CURL_ROOT to "$ROOT_APT" | ||
| elif [ ! -z "$ROOT_BREW" ]; then | ||
| echo "CURL_ROOT=$ROOT_BREW" >> $GITHUB_OUTPUT | ||
| echo Setting CURL_ROOT to "$ROOT_BREW" | ||
| elif [ ! -z "$ROOT_WINDOWS" ]; then | ||
| echo "CURL_ROOT=$ROOT_WINDOWS" >> $GITHUB_OUTPUT | ||
| echo Setting CURL_ROOT to "$ROOT_WINDOWS" | ||
| fi | ||
| env: | ||
| ROOT_APT: ${{ steps.apt-action.outputs.CURL_ROOT }} | ||
| ROOT_BREW: ${{ steps.brew-action.outputs.CURL_ROOT }} | ||
| ROOT_WINDOWS: ${{ steps.windows-action.outputs.CURL_ROOT }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to reference a step that might be skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be. It should just end up with no value.