Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/sdk-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ runs:
WORKSPACE: ${{ inputs.sdk_path }}
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
# aws-sdk-cpp (dynamodb-source) calls find_package(CURL) on Linux/macOS, regardless of LD_CURL_NETWORKING.
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows Beast build missing CURL

High Severity

This PR wires DynamoDB into sdk-release and adds CURL_ROOT / CMAKE_PREFIX_PATH only on Linux and macOS Boost.Beast builds, but the new release-server-dynamodb matrix still runs on windows-2022. For launchdarkly-cpp-server-dynamodb-source, build-release-windows.sh turns on DynamoDB/aws-sdk at configure even without --with-curl, while the Windows Boost.Beast step still omits those env vars—unlike server-dynamodb.yml, which passes them for the same simulated release path.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5c34904. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentional, because the dynamodb windows build doesn't seem to need CURL. But maybe it would be better to keep it consistent with the CI build...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it unless a reviewer objects. I don't feel strongly either way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Seems good the way it is. Just coincidental that CURL is a dependency.


- name: Build Linux Artifacts (CURL)
if: runner.os == 'Linux'
Expand Down Expand Up @@ -253,6 +256,9 @@ runs:
WORKSPACE: ${{ inputs.sdk_path }}
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
# aws-sdk-cpp (dynamodb-source) calls find_package(CURL) on Linux/macOS, regardless of LD_CURL_NETWORKING.
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}

- name: Build Mac Artifacts (CURL)
if: runner.os == 'macOS'
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
package-server-tag: ${{ steps.release.outputs['libs/server-sdk--tag_name'] }}
package-server-redis-released: ${{ steps.release.outputs['libs/server-sdk-redis-source--release_created'] }}
package-server-redis-tag: ${{ steps.release.outputs['libs/server-sdk-redis-source--tag_name'] }}
package-server-dynamodb-released: ${{ steps.release.outputs['libs/server-sdk-dynamodb-source--release_created'] }}
package-server-dynamodb-tag: ${{ steps.release.outputs['libs/server-sdk-dynamodb-source--tag_name'] }}
package-server-otel-released: ${{ steps.release.outputs['libs/server-sdk-otel--release_created'] }}
package-server-otel-tag: ${{ steps.release.outputs['libs/server-sdk-otel--tag_name'] }}
steps:
Expand Down Expand Up @@ -266,6 +268,85 @@ jobs:
with:
subject-checksums: checksums.txt

release-server-dynamodb:
strategy:
matrix:
# Each of the platforms for which release-artifacts need generated.
os: [ ubuntu-22.04, windows-2022, macos-15-large ]
runs-on: ${{ matrix.os }}
needs: [ 'release-please' ]
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true'}}
permissions:
contents: write
attestations: write
id-token: write
steps:
# https://github.com/actions/checkout/releases/tag/v4.3.0
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- id: release-server-dynamodb
name: Full release of libs/server-sdk-dynamodb-source
uses: ./.github/actions/sdk-release
with:
# The tag of the release to upload artifacts to.
tag_name: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: 'libs/server-sdk-dynamodb-source'
sdk_cmake_target: 'launchdarkly-cpp-server-dynamodb-source'
- name: Generate checksums file
env:
HASHES_LINUX: ${{ steps.release-server-dynamodb.outputs.hashes-linux }}
HASHES_WINDOWS: ${{ steps.release-server-dynamodb.outputs.hashes-windows }}
HASHES_MACOS: ${{ steps.release-server-dynamodb.outputs.hashes-macos }}
run: |
# BSD base64 (macOS) uses -D to decode; GNU base64 (Linux/Windows) uses -d.
if [[ "$OSTYPE" == darwin* ]]; then B64_DECODE="base64 -D"; else B64_DECODE="base64 -d"; fi
if [ -n "${HASHES_LINUX}" ]; then
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
elif [ -n "${HASHES_WINDOWS}" ]; then
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
elif [ -n "${HASHES_MACOS}" ]; then
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
fi
shell: bash
# https://github.com/actions/attest/releases/tag/v4.1.0
- name: Attest build provenance
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-checksums: checksums.txt

release-server-dynamodb-mac-arm64:
runs-on: macos-15
needs: [ 'release-please' ]
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true'}}
permissions:
contents: write
attestations: write
id-token: write
steps:
# https://github.com/actions/checkout/releases/tag/v4.3.0
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- id: release-server-dynamodb
name: Full release of libs/server-sdk-dynamodb-source (macOS arm64)
uses: ./.github/actions/sdk-release
with:
tag_name: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: 'libs/server-sdk-dynamodb-source'
sdk_cmake_target: 'launchdarkly-cpp-server-dynamodb-source'
mac_artifact_arch: 'arm64'
- name: Generate checksums file
env:
HASHES: ${{ steps.release-server-dynamodb.outputs.hashes-macos }}
run: |
# This job always runs on macOS, so use -D (BSD base64 decode).
echo "${HASHES}" | base64 -D > checksums.txt
shell: bash
# https://github.com/actions/attest/releases/tag/v4.1.0
- name: Attest build provenance
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-checksums: checksums.txt

publish-release-client:
needs: ['release-please', 'release-client', 'release-client-mac-arm64']
if: ${{ needs.release-please.outputs.package-client-released == 'true' }}
Expand Down Expand Up @@ -314,6 +395,22 @@ jobs:
--repo ${{ github.repository }}
--draft=false

publish-release-server-dynamodb:
needs: ['release-please', 'release-server-dynamodb', 'release-server-dynamodb-mac-arm64']
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Publish release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
run: >
gh release edit "$TAG_NAME"
--repo ${{ github.repository }}
--draft=false

publish-release-server-otel:
needs: ['release-please']
if: ${{ needs.release-please.outputs.package-server-otel-released == 'true' }}
Expand Down
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"extra-files": [
"CMakeLists.txt"
],
"draft": true,
"force-tag-creation": true
},
"libs/server-sdk-otel": {
Expand Down