diff --git a/.bazelrc b/.bazelrc index e2f73a47..796aaf51 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1 +1,2 @@ build --features=layering_check +build --enable_bzlmod diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 6ffc6119..bf102a7b 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -3,7 +3,7 @@ matrix: # instead of --std=c++20 platform: - debian11 - - ubuntu2024 + - ubuntu2204 - macos - macos-arm64 - windows diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 03e21826..accc4091 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,25 +14,30 @@ on: jobs: test_bazel: - name: "Bazel, ${{ matrix.compiler }}, ${{ matrix.os }}" + name: "Bazel, ${{ matrix.cxx }}, ${{ matrix.os }}" strategy: fail-fast: false matrix: include: - os: ubuntu-latest - compiler: g++ + cxx: g++ + cc: gcc - os: ubuntu-latest - compiler: clang++ + cxx: clang++ + cc: clang - os: macos-latest - compiler: g++ + cxx: g++ + cc: gcc - os: macos-latest - compiler: clang++ + cxx: clang++ + cc: clang - os: windows-latest - compiler: cl + cxx: cl + cc: cl runs-on: ${{ matrix.os }} steps: @@ -41,12 +46,14 @@ jobs: - name: "Build with Bazel" env: - CC: ${{ matrix.compiler }} + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} run: bazel build ... - name: "Tests with Bazel" env: - CC: ${{ matrix.compiler }} + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} run: bazel test --test_output=all ... test_cmake: diff --git a/tools/test_bazel.sh b/tools/test_bazel.sh index 2138cf53..f58c7c31 100755 --- a/tools/test_bazel.sh +++ b/tools/test_bazel.sh @@ -5,12 +5,9 @@ # ------- # - Version >= 7 are supported # - Version <= 6 fail with the error: -# ERROR: Analysis of target '//:component' failed; build aborted: no such -# package '@rules_cc//cc/compiler': BUILD file not found in directory -# 'cc/compiler' of external repository @rules_cc. Add a BUILD file to a -# directory to mark it as a package. -# - +# Error: +# external/googletest~1.14.0.bcr.1/googletest/include/gtest/internal/gtest-port.h:279:2: +# error: #error C++ versions less than C++14 are not supported. for ver in \ "7.0.0" \ "8.0.0"