Merge pull request #153 from mapbox/kk/optimize-varint-iterators #126
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: CI | |
| on: [ push, pull_request ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: | |
| - "ubuntu:20.04" # gcc 9.3.0, clang 10.0.0, cmake 3.16.3 | |
| - "ubuntu:22.04" # gcc 12.2.0, clang 15.0.7, cmake 3.24.2 | |
| - "ubuntu:24.04" # gcc 14.2.0, clang 18.1.3, cmake 3.28.3 | |
| - "debian:bullseye" # gcc 10.2.1, clang 11.0.1, cmake 3.18.4 | |
| - "debian:bookworm" # gcc 12.2.0, clang 15.0.6, cmake 3.25.1 | |
| - "debian:trixie" | |
| - "debian:testing" | |
| - "debian:experimental" | |
| - "fedora:42" | |
| - "fedora:43" | |
| - "fedora:44" | |
| build_type: [Debug] | |
| cpp_compiler: [g++] | |
| cpp_version: [14] | |
| include: | |
| - image: "debian:bookworm" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| - image: "debian:bookworm" | |
| cpp_version: 17 | |
| - image: "debian:bookworm" | |
| cpp_version: 20 | |
| - image: "debian:bookworm" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| cpp_version: 17 | |
| - image: "debian:bookworm" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| cpp_version: 20 | |
| # Disabled because it fails due to a bug in the protobuf library | |
| # See https://github.com/protocolbuffers/protobuf/issues/7224 | |
| # - image: "debian:bullseye" | |
| # c_compiler: clang | |
| # cpp_compiler: clang++ | |
| # CXXFLAGS: "-fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer" | |
| # LDFLAGS: "-fsanitize=address,undefined,integer" | |
| - image: "debian:bookworm" | |
| build_type: Release | |
| - image: "debian:bookworm" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| cpp_version: 17 | |
| data_view: std::string_view | |
| - image: "debian:trixie" | |
| cpp_compiler: clang++ | |
| CXXFLAGS: -Wno-c++20-extensions | |
| - image: "debian:testing" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| CXXFLAGS: -Wno-c++20-extensions | |
| - image: "debian:experimental" | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| CXXFLAGS: -Wno-c++20-extensions | |
| container: | |
| image: ${{ matrix.image }} | |
| env: | |
| BUILD_TYPE: ${{ matrix.build_type }} | |
| CC: ${{ matrix.c_compiler }} | |
| CXX: ${{ matrix.cpp_compiler }} | |
| CXXFLAGS: ${{ matrix.CXXFLAGS }} | |
| LDFLAGS: ${{ matrix.LDFLAGS }} | |
| CPP_VERSION: ${{ matrix.cpp_version }} | |
| PROTOZERO_DATA_VIEW: ${{ matrix.data_view }} | |
| APT_LISTCHANGES_FRONTEND: none | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - name: Prepare container (apt) | |
| shell: bash | |
| if: startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:') | |
| run: | | |
| apt-get update -qq | |
| apt-get install -y \ | |
| clang \ | |
| cmake \ | |
| doxygen \ | |
| g++ \ | |
| graphviz \ | |
| libprotobuf-dev \ | |
| make \ | |
| protobuf-compiler | |
| - name: Prepare container (dnf) | |
| shell: bash | |
| if: startsWith(matrix.image, 'fedora:') | |
| run: | | |
| dnf install --quiet --assumeyes \ | |
| cmake \ | |
| doxygen \ | |
| gcc-c++ \ | |
| graphviz \ | |
| make \ | |
| protobuf-lite-devel \ | |
| protobuf-lite | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/cmake | |
| - uses: ./.github/actions/build | |
| - uses: ./.github/actions/ctest | |
| big-endian: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: s390x | |
| - name: Build and test on s390x (big-endian) | |
| run: | | |
| docker run --rm --platform linux/s390x \ | |
| -v "${{ github.workspace }}:/src" \ | |
| -w /src \ | |
| -e DEBIAN_FRONTEND=noninteractive \ | |
| debian:bookworm \ | |
| bash -exc ' | |
| apt-get update -qq | |
| apt-get install -y \ | |
| cmake \ | |
| g++ \ | |
| libprotobuf-dev \ | |
| make \ | |
| protobuf-compiler \ | |
| python3-minimal | |
| python3 -c "import sys; assert sys.byteorder == \"big\"" | |
| mkdir -p build | |
| cd build | |
| cmake -LA .. \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_STANDARD=14 | |
| cmake --build . --parallel 2 | |
| ctest --output-on-failure --parallel 2 | |
| ' | |
| ubuntu-latest: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| env: | |
| CC: clang-18 | |
| CXX: clang++-18 | |
| BUILD_TYPE: Debug | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/install-ubuntu | |
| - uses: ./.github/actions/cmake | |
| - uses: ./.github/actions/build | |
| - uses: ./.github/actions/ctest | |
| macos: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-14 | |
| - macos-15 | |
| - macos-26 | |
| build_type: [Debug] | |
| include: | |
| - os: macos-15 | |
| build_type: Release | |
| env: | |
| CC: clang | |
| CXX: clang++ | |
| BUILD_TYPE: ${{ matrix.build_type }} | |
| steps: | |
| - run: brew install doxygen graphviz protobuf | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/cmake | |
| - uses: ./.github/actions/build | |
| - uses: ./.github/actions/ctest | |
| windows: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-2022 | |
| - windows-2025 | |
| steps: | |
| - run: | | |
| vcpkg install \ | |
| protobuf:x64-windows \ | |
| protobuf-c:x64-windows | |
| shell: bash | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/cmake-windows | |
| - uses: ./.github/actions/build-windows | |
| - uses: ./.github/actions/ctest-windows |