build(deps-dev): bump urllib3 from 2.4.0 to 2.5.0 in /cpp/foxglove/do… #1322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ | |
on: | |
push: | |
branches: [main] | |
tags: ["**"] | |
pull_request: {} | |
workflow_call: | |
inputs: | |
sdk-version: | |
required: true | |
type: string | |
outputs: | |
artifact_pattern: | |
description: "pattern to match all uploaded artifact names" | |
value: ${{ jobs.build.outputs.artifact_pattern }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: clang-format --version | |
- run: make lint | |
working-directory: cpp | |
- run: make CLANG_TIDY=true build | |
working-directory: cpp | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux | |
- runner: ubuntu-24.04 | |
target: aarch64-unknown-linux-gnu | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.so | |
staticlib_artifact_name: libfoxglove-aarch64-unknown-linux-gnu.a | |
cdylib_artifact_name: libfoxglove-aarch64-unknown-linux-gnu.so | |
cross: true | |
- runner: ubuntu-24.04 | |
target: x86_64-unknown-linux-gnu | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.so | |
staticlib_artifact_name: libfoxglove-x86_64-unknown-linux-gnu.a | |
cdylib_artifact_name: libfoxglove-x86_64-unknown-linux-gnu.so | |
cross: false | |
# macOS | |
- runner: macos-15 | |
target: aarch64-apple-darwin | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.dylib | |
staticlib_artifact_name: libfoxglove-aarch64-apple-darwin.a | |
cdylib_artifact_name: libfoxglove-aarch64-apple-darwin.dylib | |
cross: false | |
- runner: macos-15 | |
target: x86_64-apple-darwin | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.dylib | |
staticlib_artifact_name: libfoxglove-x86_64-apple-darwin.a | |
cdylib_artifact_name: libfoxglove-x86_64-apple-darwin.dylib | |
cross: true | |
# Windows | |
- runner: windows-2025 | |
target: x86_64-pc-windows-msvc | |
staticlib_name: foxglove.lib | |
cdylib_name: foxglove.dll | |
staticlib_artifact_name: foxglove-x86_64-pc-windows-msvc.lib | |
cdylib_artifact_name: foxglove-x86_64-pc-windows-msvc.dll | |
cross: false | |
- runner: windows-2025 | |
target: aarch64-pc-windows-msvc | |
staticlib_name: foxglove.lib | |
cdylib_name: foxglove.dll | |
staticlib_artifact_name: foxglove-aarch64-pc-windows-msvc.lib | |
cdylib_artifact_name: foxglove-aarch64-pc-windows-msvc.dll | |
cross: true | |
# iOS | |
- runner: macos-15 | |
target: aarch64-apple-ios | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.dylib | |
staticlib_artifact_name: libfoxglove-aarch64-apple-ios.a | |
cdylib_artifact_name: libfoxglove-aarch64-apple-ios.dylib | |
cross: true | |
# iOS simulator | |
- runner: macos-15 | |
target: aarch64-apple-ios-sim | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.dylib | |
staticlib_artifact_name: libfoxglove-aarch64-apple-ios-sim.a | |
cdylib_artifact_name: libfoxglove-aarch64-apple-ios-sim.dylib | |
cross: true | |
- runner: macos-15 | |
target: x86_64-apple-ios | |
staticlib_name: libfoxglove.a | |
cdylib_name: libfoxglove.dylib | |
staticlib_artifact_name: libfoxglove-x86_64-apple-ios.a | |
cdylib_artifact_name: libfoxglove-x86_64-apple-ios.dylib | |
cross: true | |
name: build (${{ matrix.target }}) | |
runs-on: ${{ matrix.runner }} | |
env: | |
CARGO_BUILD_TARGET: ${{ matrix.target }} | |
outputs: | |
artifact_pattern: "*.zip" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
- run: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
- run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
- name: Build C library for ${{ matrix.target }} | |
env: | |
FOXGLOVE_SDK_LANGUAGE: c | |
run: cargo build --release | |
working-directory: c | |
- name: Ensure generated files are up to date | |
run: git diff --exit-code | |
- name: Build C++ library and run tests | |
if: ${{ !fromJson(matrix.cross) }} | |
run: make test | |
working-directory: cpp | |
- name: Organize artifacts for zip | |
shell: bash | |
run: | | |
mkdir -p artifacts/foxglove/lib | |
mkdir -p artifacts/foxglove/include | |
mkdir -p artifacts/foxglove/src | |
mv target/${{ matrix.target }}/release/${{ matrix.staticlib_name }} artifacts/foxglove/lib/ | |
mv target/${{ matrix.target }}/release/${{ matrix.cdylib_name }} artifacts/foxglove/lib/ | |
cp -R c/include/foxglove-c artifacts/foxglove/include/ | |
cp -R cpp/foxglove/include/foxglove artifacts/foxglove/include/ | |
cp -R cpp/foxglove/src/* artifacts/foxglove/src/ | |
- name: Zip libraries for artifact | |
if: runner.os != 'Windows' | |
working-directory: artifacts | |
run: | | |
zip -r \ | |
foxglove-${{inputs.sdk-version || github.sha}}-cpp-${{ matrix.target }}.zip \ | |
foxglove/ | |
- name: Zip libraries for artifact (Windows) | |
if: runner.os == 'Windows' | |
working-directory: artifacts | |
run: | | |
7z a -tzip -sse ` | |
foxglove-${{inputs.sdk-version || github.sha}}-cpp-${{ matrix.target }}.zip ` | |
foxglove/ | |
- name: Upload static & shared library to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: foxglove-${{inputs.sdk-version || github.sha}}-cpp-${{ matrix.target }}.zip | |
path: artifacts/foxglove-${{inputs.sdk-version || github.sha}}-cpp-${{ matrix.target }}.zip | |
if-no-files-found: error | |
test-asan-ubsan: | |
runs-on: ubuntu-latest | |
env: | |
CC: clang | |
CXX: clang++ | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rust-src | |
- run: make SANITIZE=address,undefined test | |
working-directory: cpp |