diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b30c028..6559004 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -1,21 +1,14 @@ +# ref: https://github.com/actions/runner-images name: build_and_test # Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: +on: [push, pull_request, workflow_dispatch] env: PIP_BREAK_SYSTEM_PACKAGES: 1 # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - unix: strategy: fail-fast: false @@ -30,28 +23,21 @@ jobs: steps: - name: Show env run: env - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Install bazel + - name: Setup bazel if: matrix.build_tool == 'bazel' - # Install Bazel, see https://docs.bazel.build/versions/master/install-ubuntu.html#step-1-install-required-packages - run: | - sudo apt install curl gnupg - curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg - sudo mv bazel.gpg /etc/apt/trusted.gpg.d/ - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list - sudo apt update && sudo apt install bazel -y + uses: bazel-contrib/setup-bazel@0.8.4 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true - name: Show bazel version if: matrix.build_tool == 'bazel' run: bazel --version - - name: Update cmake - if: matrix.build_tool == 'cmake' - uses: jwlawson/actions-setup-cmake@v1.14 - - name: Show cmake version if: matrix.build_tool == 'cmake' run: cmake --version diff --git a/.github/workflows/amd64_linux_bazel.yml b/.github/workflows/amd64_linux_bazel.yml new file mode 100644 index 0000000..300c7aa --- /dev/null +++ b/.github/workflows/amd64_linux_bazel.yml @@ -0,0 +1,66 @@ +# ref: https://github.com/actions/runner-images +name: amd64 Linux Bazel + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + bazel: [ + {compilation_mode: opt}, + {compilation_mode: dbg}, + ] + cpp: [ + {version: 14, flags: "-std=c++14"}, + {version: 17, flags: "-std=c++17"}, + {version: 20, flags: "-std=c++20"}, + ] + python: [ + {version: '3.11'}, + ] + exclude: + # only test `-c dbg` build with C++17 + - cpp: {version: 14} + bazel: {compilation_mode: dbg} + - cpp: {version: 20} + bazel: {compilation_mode: dbg} + fail-fast: false + name: Linux•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check Java + run: java -version + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - uses: bazel-contrib/setup-bazel@0.8.4 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + - name: Check Bazel + run: bazel version + - name: Build + run: > + bazel build + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... + - name: Test + run: > + bazel test + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... diff --git a/.github/workflows/amd64_linux_cmake.yml b/.github/workflows/amd64_linux_cmake.yml new file mode 100644 index 0000000..665749c --- /dev/null +++ b/.github/workflows/amd64_linux_cmake.yml @@ -0,0 +1,68 @@ +# ref: https://github.com/actions/runner-images +name: amd64 Linux CMake + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + #{version: '3.13'}, + ] + cmake: [ + {generator: "Unix Makefiles", config: "Release"}, + {generator: "Ninja", config: "Release"}, + #{generator: "Ninja Multi-Config", config: "Release"}, + ] + fail-fast: false + name: Linux•CMake(${{ matrix.cmake.generator }})•Python${{ matrix.python.version }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - name: Install Python requirements + run: python -m pip install --upgrade -r $(python -c 'import sys; print("./pybind11_abseil/requirements/requirements_lock_%d_%d.txt" % (sys.version_info[:2]))') + - name: Install Ninja + run: | + sudo apt-get update + sudo apt-get install ninja-build + - name: Check CMake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G "${{ matrix.cmake.generator }}" + -DCMAKE_BUILD_TYPE="${{ matrix.cmake.config }}" + -DCMAKE_INSTALL_PREFIX=install + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target all + -v -j2 + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target test + -v + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target install + -v diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml new file mode 100644 index 0000000..ea612f0 --- /dev/null +++ b/.github/workflows/amd64_macos_bazel.yml @@ -0,0 +1,68 @@ +# ref: https://github.com/actions/runner-images +name: amd64 MacOS Bazel + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + bazel: [ + {compilation_mode: opt}, + {compilation_mode: dbg}, + ] + cpp: [ + #{version: 14, flags: "-std=c++14"}, + {version: 17, flags: "-std=c++17"}, + #{version: 20, flags: "-std=c++20"}, + ] + python: [ + {version: '3.11'}, + ] + exclude: + # only test `-c dbg` build with C++17 + - cpp: {version: 14} + bazel: {compilation_mode: dbg} + - cpp: {version: 20} + bazel: {compilation_mode: dbg} + fail-fast: false + name: MacOS•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }} + runs-on: macos-13 # last macos intel based runner + steps: + - uses: actions/checkout@v4 + - name: Set Java to OpenJDK 17 (Temurin) + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - name: Check Bazel + run: bazel version + - name: Change Python in MODULE.bazel + run: | + sed -i '' -e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g' MODULE.bazel + cat MODULE.bazel + - name: Build + run: > + bazel build + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... + - name: Test + run: > + bazel test + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... diff --git a/.github/workflows/amd64_macos_cmake.yml b/.github/workflows/amd64_macos_cmake.yml new file mode 100644 index 0000000..6568278 --- /dev/null +++ b/.github/workflows/amd64_macos_cmake.yml @@ -0,0 +1,65 @@ +# ref: https://github.com/actions/runner-images +name: amd64 MacOS CMake + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + #{version: '3.13'}, + ] + cmake: [ + {generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install}, + {generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install}, + ] + fail-fast: false + name: MacOS•CMake(${{ matrix.cmake.generator }})•Python${{ matrix.python.version }} + runs-on: macos-13 # last macos intel based runner + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Update Path + run: | + echo "$HOME/Library/Python/${{ matrix.python.version }}/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Check Python + run: python --version + - name: Install Python requirements + run: python -m pip install --upgrade -r $(python -c 'import sys; print("./pybind11_abseil/requirements/requirements_lock_%d_%d.txt" % (sys.version_info[:2]))') + - name: Check CMake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G "${{ matrix.cmake.generator }}" + -DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }} + -DCMAKE_INSTALL_PREFIX=install + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v -j2 + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v diff --git a/.github/workflows/amd64_windows_bazel.yml b/.github/workflows/amd64_windows_bazel.yml new file mode 100644 index 0000000..fea040d --- /dev/null +++ b/.github/workflows/amd64_windows_bazel.yml @@ -0,0 +1,66 @@ +# ref: https://github.com/actions/runner-images +name: amd64 Windows Bazel + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + runner: [windows-2022, windows-2019] + bazel: [ + {compilation_mode: opt}, + {compilation_mode: dbg}, + ] + cpp: [ + {version: 14, flags: "/std:c++14"}, + {version: 17, flags: "/std:c++17"}, + {version: 20, flags: "/std:c++20"}, + ] + python: [ + {version: '3.11'}, + ] + exclude: + - runner: windows-2019 + cpp: {version: 20} + # only test -c dbg with VS 2022 version 17 to save compute time + - runner: windows-2019 + bazel: {compilation_mode: dbg} + - cpp: {version: 14} + bazel: {compilation_mode: dbg} + - cpp: {version: 20} + bazel: {compilation_mode: dbg} + fail-fast: false # Don't cancel all jobs if one fails. + name: ${{ matrix.runner }}•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }} + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - name: Install Bazel + run: choco install bazel + - name: Check Bazel + run: bazel version + - name: Build + run: > + bazel build + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... + - name: Test + run: > + bazel test + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... diff --git a/.github/workflows/amd64_windows_cmake.yml b/.github/workflows/amd64_windows_cmake.yml new file mode 100644 index 0000000..b8e5b58 --- /dev/null +++ b/.github/workflows/amd64_windows_cmake.yml @@ -0,0 +1,63 @@ +# ref: https://github.com/actions/runner-images +name: amd64 Windows CMake + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + python: [ + {version: '3.11'}, + #{version: '3.12'}, + #{version: '3.13'}, + ] + cmake: [ + {generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, + ] + fail-fast: false + name: Windows•CMake(${{ matrix.cmake.generator }})•Python${{ matrix.python.version }} + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - name: Install Python requirements + run: python -m pip install --upgrade -r $(python -c 'import sys; print("./pybind11_abseil/requirements/requirements_lock_%d_%d.txt" % (sys.version_info[:2]))') + - name: Check CMake + run: | + cmake --version + cmake -G || true + - name: Configure + run: > + cmake -S. -Bbuild + -G "${{ matrix.cmake.generator }}" + -DCMAKE_CONFIGURATION_TYPES=${{ matrix.cmake.config }} + -DCMAKE_INSTALL_PREFIX=install + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v -j2 + - name: Test + shell: bash + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v diff --git a/.github/workflows/arm64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml new file mode 100644 index 0000000..dc2d0ee --- /dev/null +++ b/.github/workflows/arm64_macos_bazel.yml @@ -0,0 +1,68 @@ +# ref: https://github.com/actions/runner-images +name: arm64 MacOS Bazel + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + bazel: [ + {compilation_mode: opt}, + {compilation_mode: dbg}, + ] + cpp: [ + #{version: 14, flags: "-std=c++14"}, + {version: 17, flags: "-std=c++17"}, + #{version: 20, flags: "-std=c++20"}, + ] + python: [ + {version: '3.11'}, + ] + exclude: + # only test `-c dbg` build with C++17 + - cpp: {version: 14} + bazel: {compilation_mode: dbg} + - cpp: {version: 20} + bazel: {compilation_mode: dbg} + fail-fast: false + name: MacOS•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }} + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Set Java to OpenJDK 17 (Temurin) + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Check Python + run: | + python --version + python -m platform + - name: Check Bazel + run: bazel version + - name: Change Python in MODULE.bazel + run: | + sed -i '' -e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g' MODULE.bazel + cat MODULE.bazel + - name: Build + run: > + bazel build + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... + - name: Test + run: > + bazel test + -c ${{ matrix.bazel.compilation_mode }} + --cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... diff --git a/.github/workflows/arm64_macos_cmake.yml b/.github/workflows/arm64_macos_cmake.yml new file mode 100644 index 0000000..d677031 --- /dev/null +++ b/.github/workflows/arm64_macos_cmake.yml @@ -0,0 +1,65 @@ +# ref: https://github.com/actions/runner-images +name: arm64 MacOS CMake + +on: [push, pull_request, workflow_dispatch] + +# Building using the github runner environement directly. +jobs: + native: + strategy: + matrix: + python: [ + {version: '3.9'}, + {version: '3.10'}, + {version: '3.11'}, + {version: '3.12'}, + #{version: '3.13'}, + ] + cmake: [ + {generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install}, + {generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install}, + ] + fail-fast: false + name: MacOS•CMake(${{ matrix.cmake.generator }})•Python${{ matrix.python.version }} + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python.version }} + - name: Update Path + run: | + echo "$HOME/Library/Python/${{ matrix.python.version }}/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Check Python + run: python --version + - name: Install Python requirements + run: python -m pip install --upgrade -r $(python -c 'import sys; print("./pybind11_abseil/requirements/requirements_lock_%d_%d.txt" % (sys.version_info[:2]))') + - name: Check CMake + run: cmake --version + - name: Configure + run: > + cmake -S. -Bbuild + -G "${{ matrix.cmake.generator }}" + -DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }} + -DCMAKE_INSTALL_PREFIX=install + - name: Build + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.build_target }} + -v -j2 + - name: Test + run: > + CTEST_OUTPUT_ON_FAILURE=1 + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.test_target }} + -v + - name: Install + run: > + cmake --build build + --config ${{ matrix.cmake.config }} + --target ${{ matrix.cmake.install_target }} + -v diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml new file mode 100644 index 0000000..8776e1d --- /dev/null +++ b/.github/workflows/ubuntu-build.yml @@ -0,0 +1,77 @@ +# ref: https://github.com/actions/runner-images +name: ubuntu-build + +on: [push, pull_request, workflow_dispatch] + +concurrency: + group: ci-${{github.workflow}}-${{ github.ref }} + cancel-in-progress: true + +jobs: + cmake: + name: CMake ubuntu-22.04 + runs-on: ubuntu-22.04 + steps: + - name: Show env + run: env + - uses: actions/checkout@v4 + - name: Install Build Dependencies + run: > + sudo apt update && + sudo apt install --no-install-recommends -y + cmake make + - name: Show Python version and platform info + run: | + python --version + python -m platform + - name: Show CMake version + run: cmake --version + - name: CMake Configure + run: cmake -S. -Bbuild -DCMAKE_VERBOSE_MAKEFILE=ON + - name: CMake Build + run: cmake --build build -j$(nproc) + + bazel: + strategy: + matrix: + options: [ + {version: 14, flags: "-std=c++14"}, + {version: 17, flags: "-std=c++17"}, + {version: 20, flags: "-std=c++20"}, + ] + fail-fast: false # Don't cancel all jobs if one fails. + name: Bazel ubuntu-22.04 C++${{ matrix.options.version }} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 # Current default version in MODULE.bazel + - name: Show Python version and platform info + run: | + python --version + python -m platform + - uses: bazel-contrib/setup-bazel@0.8.4 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + - name: Show Bazel version + run: bazel --version + - name: Bazel Build + shell: bash + run: > + bazel build + --cxxopt=${{ matrix.options.flags }} --host_cxxopt=${{ matrix.options.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... + - name: Bazel Test + shell: bash + run: > + bazel test + --cxxopt=${{ matrix.options.flags }} --host_cxxopt=${{ matrix.options.flags }} + --subcommands=pretty_print + --enable_bzlmod + //... diff --git a/README.md b/README.md index f1ad3fb..e992123 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,30 @@ # Pybind11 bindings for the Abseil C++ Common Libraries -![build_and_test](https://github.com/pybind/pybind11_abseil/workflows/build_and_test/badge.svg) +Github-CI: +| OS \ Build system | Bazel | CMake | +|:------- | :---: | :---: | +| Linux (`amd64`) | [![Build Status][amd64_linux_bazel_status]][amd64_linux_bazel_link] | [![Build Status][amd64_linux_cmake_status]][amd64_linux_cmake_link] | +| MacOS (`amd64`) | [![Build Status][amd64_macos_bazel_status]][amd64_macos_bazel_link] | [![Build Status][amd64_macos_cmake_status]][amd64_macos_cmake_link] | +| MacOS (`arm64`) | [![Build Status][arm64_macos_bazel_status]][arm64_macos_bazel_link] | [![Build Status][arm64_macos_cmake_status]][arm64_macos_cmake_link] | +| Windows (`amd64`) | [![Build Status][amd64_windows_bazel_status]][amd64_windows_bazel_link] | [![Build Status][amd64_windows_cmake_status]][amd64_windows_cmake_link] | + +[amd64_linux_bazel_status]: ./../../actions/workflows/amd64_linux_bazel.yml/badge.svg +[amd64_linux_bazel_link]: ./../../actions/workflows/amd64_linux_bazel.yml +[amd64_macos_bazel_status]: ./../../actions/workflows/amd64_macos_bazel.yml/badge.svg +[amd64_macos_bazel_link]: ./../../actions/workflows/amd64_macos_bazel.yml +[arm64_macos_bazel_status]: ./../../actions/workflows/arm64_macos_bazel.yml/badge.svg +[arm64_macos_bazel_link]: ./../../actions/workflows/arm64_macos_bazel.yml +[amd64_windows_bazel_status]: ./../../actions/workflows/amd64_windows_bazel.yml/badge.svg +[amd64_windows_bazel_link]: ./../../actions/workflows/amd64_windows_bazel.yml + +[amd64_linux_cmake_status]: ./../../actions/workflows/amd64_linux_cmake.yml/badge.svg +[amd64_linux_cmake_link]: ./../../actions/workflows/amd64_linux_cmake.yml +[amd64_macos_cmake_status]: ./../../actions/workflows/amd64_macos_cmake.yml/badge.svg +[amd64_macos_cmake_link]: ./../../actions/workflows/amd64_macos_cmake.yml +[arm64_macos_cmake_status]: ./../../actions/workflows/arm64_macos_cmake.yml/badge.svg +[arm64_macos_cmake_link]: ./../../actions/workflows/arm64_macos_cmake.yml +[amd64_windows_cmake_status]: ./../../actions/workflows/amd64_windows_cmake.yml/badge.svg +[amd64_windows_cmake_link]: ./../../actions/workflows/amd64_windows_cmake.yml [TOC] diff --git a/scripts/build_and_run_tests_bazel.sh b/scripts/build_and_run_tests_bazel.sh index 113e363..c1ddd13 100755 --- a/scripts/build_and_run_tests_bazel.sh +++ b/scripts/build_and_run_tests_bazel.sh @@ -19,10 +19,15 @@ fi echo "Building and testing in $PWD using 'python' (version $PYVERSION)." -bazel clean --expunge # Force a dep update - -BAZEL_CXXOPTS="-std=c++17" bazel test ... --test_output=errors "$@" --enable_bzlmod -BAZEL_CXXOPTS="-std=c++20" bazel test ... --test_output=errors "$@" --enable_bzlmod - -BAZEL_CXXOPTS="-std=c++17" bazel test ... --test_output=errors "$@" --noenable_bzlmod -BAZEL_CXXOPTS="-std=c++20" bazel test ... --test_output=errors "$@" --noenable_bzlmod +bazel clean --expunge # Force a deep update + +# Can't use BAZEL_CXXOPTS since it will be override by the bazelrc cxxopt need +# to use --cxxopt on the command line instead which will override the bazelrc +# cxxopt config. +bazel test --cxxopt=-std=c++14 ... --test_output=errors "$@" --enable_bzlmod +bazel test --cxxopt=-std=c++17 ... --test_output=errors "$@" --enable_bzlmod +bazel test --cxxopt=-std=c++20 ... --test_output=errors "$@" --enable_bzlmod + +#bazel test --cxxopt=-std=c++14 ... --test_output=errors "$@" --noenable_bzlmod --enable_workspace +bazel test --cxxopt=-std=c++17 ... --test_output=errors "$@" --noenable_bzlmod --enable_workspace +bazel test --cxxopt=-std=c++20 ... --test_output=errors "$@" --noenable_bzlmod --enable_workspace