Upgrade to C++20 modules #107
Workflow file for this run
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: Premerge | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CMAKE_PRESET: release | |
| CC: gcc-16 | |
| CXX: g++-16 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v7.0.0 | |
| - uses: pre-commit/action@v3.0.1 | |
| - name: Install GCC 16 | |
| run: | | |
| # We require C++26, which currently is best supported in gcc-16. | |
| # By default, Ubuntu 24.04 only supports up to gcc-13, | |
| # but ubuntu-toolchain-r/test carries experimental trunk snapshots. | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-16 g++-16 | |
| g++-16 --version | |
| - name: Install LLVM | |
| run: | | |
| # LLVM 23 has branched, so it lives in its own apt suite now. Upstream | |
| # llvm.sh still maps 23 to the unversioned suite, which serves LLVM 24 | |
| # snapshots, so add the release repository directly instead. | |
| CODENAME=$(lsb_release -cs) | |
| sudo mkdir -p /etc/apt/keyrings | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \ | |
| | sudo tee /etc/apt/keyrings/apt.llvm.org.asc > /dev/null | |
| echo "deb [signed-by=/etc/apt/keyrings/apt.llvm.org.asc] https://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-23 main" \ | |
| | sudo tee /etc/apt/sources.list.d/llvm-23.list > /dev/null | |
| sudo apt-get update | |
| sudo apt-get install -y llvm-23-dev libmlir-23-dev mlir-23-tools | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| create-symlink: true | |
| - name: Configure CMake | |
| run: cmake --preset ${{env.CMAKE_PRESET}} | |
| - name: Build | |
| run: cmake --build --preset ${{env.CMAKE_PRESET}} | |
| - name: Test | |
| run: | | |
| ctest --preset ${{env.CMAKE_PRESET}} -E integration-tests | |
| # only run the integration-tests with verbose so we can see the | |
| # whole output which includes which python scripts passed | |
| ctest --preset ${{env.CMAKE_PRESET}} -R integration-tests -V | |