fix compatible issue with gcc-9 #466
Workflow file for this run
This file contains 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: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
basic: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [{name: gcc, flag: --action_env=CC=gcc-14}, {name: clang, flag: --action_env=CC=clang-18}] | |
mode: [{name: dbg, flag: --compilation_mode=dbg}, {name: opt, flag: --compilation_mode=opt}] | |
std: [{name: c++20, flag: --cxxopt=-std=c++20}, {name: c++14, flag: --cxxopt=-std=c++14}] | |
stdlib: [{name: stdlibc++}, {name: libc++, flag: --cxxopt=-stdlib=libc++ --linkopt=-stdlib=libc++}] | |
feature: [{name: asan, flag: --config=asan}, {name: tsan, flag: --features=tsan}] | |
exclude: | |
- compiler: {name: gcc} | |
stdlib: {name: libc++} | |
- std: {name: c++14} | |
feature: {name: tsan} | |
runs-on: ubuntu-24.04 | |
name: basic-${{matrix.compiler.name}}-${{matrix.mode.name}}-${{matrix.std.name}}-${{matrix.stdlib.name}}-${{matrix.feature.name}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-basic-${{matrix.compiler.name}}-${{matrix.mode.name}}-${{matrix.std.name}}-${{matrix.stdlib.name}}-${{matrix.feature.name}}-${{github.sha}} | |
restore-keys: bazel-disk-basic-${{matrix.compiler.name}}-${{matrix.mode.name}}-${{matrix.std.name}}-${{matrix.stdlib.name}}-${{matrix.feature.name}}- | |
- if: ${{matrix.stdlib.name == 'libc++'}} | |
run: sudo apt install libc++-18-dev libc++abi-18-dev | |
- run: bazel test --disk_cache=bazel-disk --verbose_failures --test_output=errors ${{matrix.compiler.flag}} ${{matrix.mode.flag}} ${{matrix.std.flag}} ${{matrix.stdlib.flag}} ${{matrix.feature.flag}} test/... | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-basic-${{matrix.compiler.name}}-${{matrix.mode.name}}-${{matrix.std.name}}-${{matrix.stdlib.name}}-${{matrix.feature.name}}-${{github.sha}} | |
compatible: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [{name: gcc-9, flag: --action_env=CC=gcc-9}] | |
runs-on: ubuntu-20.04 | |
name: compatible-${{matrix.compiler.name}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-compatible-${{matrix.compiler.name}}-${{github.sha}} | |
restore-keys: bazel-disk-compatible-${{matrix.compiler.name}} | |
- run: bazel test --disk_cache=bazel-disk --verbose_failures --test_output=errors ${{matrix.compiler.flag}} test/... | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-basic-${{matrix.compiler.name}}-${{github.sha}} | |
arenastring: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [{name: gcc, flag: --action_env=CC=gcc-14}, {name: clang, flag: --action_env=CC=clang-18}] | |
stdlib: [{name: stdlibc++}, {name: libc++, flag: --cxxopt=-stdlib=libc++ --linkopt=-stdlib=libc++}] | |
mutable: [{name: default}, {name: half, flag: --config=arenastring}, {name: full, flag: --config=mutable-donated-string}] | |
exclude: | |
- compiler: {name: gcc} | |
stdlib: {name: libc++} | |
- compiler: {name: clang} | |
mutable: {name: half} | |
- compiler: {name: clang} | |
mutable: {name: full} | |
runs-on: ubuntu-24.04 | |
name: arenastring-${{matrix.compiler.name}}-${{matrix.stdlib.name}}-${{matrix.mutable.name}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-arenastring-${{matrix.compiler.name}}-${{matrix.stdlib.name}}-${{matrix.mutable.name}}-${{github.sha}} | |
restore-keys: bazel-disk-arenastring-${{matrix.compiler.name}}-${{matrix.stdlib.name}}-${{matrix.mutable.name}}- | |
- if: ${{matrix.stdlib.name == 'libc++'}} | |
run: sudo apt install libc++-18-dev libc++abi-18-dev | |
- run: sed -i "/single_version_override.*protobuf/s/version = '[^']*'/version = '28.3.arenastring'/" MODULE.bazel | |
- run: bazel test --compilation_mode=opt --disk_cache=bazel-disk --verbose_failures --test_output=errors --config=asan --registry=https://bcr.bazel.build --registry=file://%workspace%/registry ${{matrix.compiler.flag}} ${{matrix.stdlib.flag}} ${{matrix.mutable.flag}} test/... | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-arenastring-${{matrix.compiler.name}}-${{matrix.stdlib.name}}-${{matrix.mutable.name}}-${{github.sha}} | |
cpp14-coroutine: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-c++14-coroutine-${{github.sha}} | |
restore-keys: bazel-disk-c++14-coroutine- | |
- run: sed -i "/single_version_override.*protobuf/s/version = '[^']*'/version = '27.5'/" MODULE.bazel | |
- run: bazel test --disk_cache=bazel-disk --verbose_failures --test_output=errors --action_env=CC=gcc-12 --cxxopt=-std=c++14 --cxxopt=-fcoroutines --cxxopt=-fconcepts test/... | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-c++14-coroutine-${{github.sha}} | |
aarch64: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-aarch64-${{github.sha}} | |
restore-keys: bazel-disk-aarch64- | |
- run: sudo apt update | |
- run: sudo apt install g++-14-aarch64-linux-gnu | |
- run: sudo apt install qemu-user | |
- run: sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ | |
- run: bazel test --disk_cache=bazel-disk --verbose_failures --test_output=errors --platforms='@cross_config_toolchain//:cross' --action_env=CROSS_CC=/usr/bin/aarch64-linux-gnu-gcc-14 --features=-default_link_flags --test_env=LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib -- test/... -test/logging:test_log_statically | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-aarch64-${{github.sha}} | |
workspace: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-workspace-${{github.sha}} | |
restore-keys: bazel-disk-workspace- | |
- run: bazel test --disk_cache=bazel-disk --verbose_failures --test_output=errors --enable_bzlmod=false test/... | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-workspace-${{github.sha}} | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache/restore@v4 | |
with: | |
path: bazel-disk | |
key: bazel-disk-coverage-${{github.sha}} | |
restore-keys: bazel-disk-coverage- | |
- run: bazel coverage --disk_cache=bazel-disk --verbose_failures --test_output=errors --combined_report=lcov --instrumentation_filter='src/babylon,-src/babylon/reusable/patch' test/... | |
- run: .github/workflows/filter_lcov.sh | |
- uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{github.token}} | |
file: bazel-out/_coverage/_coverage_report.lcov | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: bazel-disk | |
key: bazel-disk-coverage-${{github.sha}} | |
cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hendrikmuhs/[email protected] | |
- run: cmake -Bbuild -DBUILD_DEPS=ON -DBUILD_TESTING=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
- run: cmake --build build --parallel $(nproc) | |
- run: ctest --test-dir build --output-on-failure --parallel $(nproc) |