gcc windows #1125
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 windows | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '20 3 * * *' | |
| jobs: | |
| all: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cpp_version: [c++17, c++20, c++23, c++26] | |
| # Note: We are never building without optimizations because mingw complains that the object | |
| # files become too big. | |
| build_flags: [-O2, -O3 -DNDEBUG, -O3 -DNDEBUG -ffast-math] | |
| runs-on: windows-2022 | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: msys2/setup-msys2@v2.31.1 | |
| with: | |
| msystem: mingw64 | |
| install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja | |
| - name: Print compiler version | |
| run: g++ --version | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build | |
| -DTINY_OPTIONAL_BUILD_TESTS=ON | |
| -DCMAKE_BUILD_TYPE= | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DTINY_OPTIONAL_ADDITIONAL_FLAGS="${{ format('-Wa,-mbig-obj -std={0} {1}', matrix.cpp_version, matrix.build_flags) }}" | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Run tests | |
| run: ctest --test-dir build --output-on-failure --parallel | |