gcc linux #915
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: gcc linux | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '20 3 * * *' | |
| env: | |
| TEST_DIR: ./tests | |
| jobs: | |
| all: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| gcc_version: [9, 11, 13, 14] | |
| cpp_version: [c++17, c++20] | |
| arch: [m64, m32] # 64 and 32 bit | |
| buildmode: [~ , -O3 -DNDEBUG, -O3 -DNDEBUG -ffast-math] | |
| # gcc 9 does not support C++20 | |
| exclude: | |
| - gcc_version: 9 | |
| cpp_version: c++20 | |
| # Also include a few variations with disabled UB tricks (not for all to limit resource consumption). | |
| include: | |
| - gcc_version: 13 | |
| cpp_version: c++20 | |
| arch: m64 | |
| buildmode: -DTINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install gcc | |
| run: | | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
| sudo apt update -y | |
| sudo apt install ${{ format('gcc-{0} g++-{0}', matrix.gcc_version) }} -y | |
| - name: Install gcc-multilib for x86 if required | |
| # Creating a 32 bit executable on a 64 bit OS requires the gcc multilib. | |
| # It is not installed by default on the github runner. | |
| if: ${{ matrix.arch == 'm32' }} | |
| run: | | |
| sudo apt update -y | |
| sudo apt install ${{ format('gcc-{0}-multilib g++-{0}-multilib', matrix.gcc_version) }} -y | |
| - name: Build and run tests | |
| working-directory: ${{env.TEST_DIR}} | |
| env: | |
| CXX: ${{ format('g++-{0}', matrix.gcc_version) }} | |
| ADDITIONAL_FLAGS: ${{ format('-{0} -std={1} {2}', matrix.arch, matrix.cpp_version, matrix.buildmode) }} | |
| run: make generic |