|
| 1 | +name: CI-mingw |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +defaults: |
| 6 | + run: |
| 7 | + shell: msys2 {0} |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + compiler: [clang++, g++] |
| 15 | + fail-fast: false |
| 16 | + |
| 17 | + runs-on: windows-2025 |
| 18 | + |
| 19 | + env: |
| 20 | + CXX: ${{ matrix.compiler }} |
| 21 | + |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Set up MSYS2 |
| 26 | + uses: msys2/setup-msys2@v2 |
| 27 | + with: |
| 28 | + release: false # use pre-installed |
| 29 | + # TODO: install mingw-w64-x86_64-make and use mingw32.make instead - currently fails with "Windows Subsystem for Linux has no installed distributions." |
| 30 | + install: >- |
| 31 | + make |
| 32 | + mingw-w64-x86_64-gcc |
| 33 | + mingw-w64-x86_64-clang |
| 34 | + mingw-w64-x86_64-libc++-dev |
| 35 | +
|
| 36 | + - name: Install missing Python packages |
| 37 | + run: | |
| 38 | + python3 -m pip config set global.break-system-packages true |
| 39 | + python3 -m pip install pytest |
| 40 | +
|
| 41 | + - name: make simplecpp |
| 42 | + run: make -j$(nproc) |
| 43 | + |
| 44 | + - name: make test |
| 45 | + run: make -j$(nproc) test |
| 46 | + |
| 47 | + - name: selfcheck |
| 48 | + run: | |
| 49 | + make -j$(nproc) selfcheck |
| 50 | +
|
| 51 | + - name: integration test |
| 52 | + run: | |
| 53 | + python3 -m pytest integration_test.py -vv |
| 54 | +
|
| 55 | + - name: Run CMake |
| 56 | + run: | |
| 57 | + cmake -S . -B cmake.output |
| 58 | +
|
| 59 | + - name: CMake simplecpp |
| 60 | + run: | |
| 61 | + cmake --build cmake.output --target simplecpp -- -j $(nproc) |
| 62 | +
|
| 63 | + - name: CMake testrunner |
| 64 | + run: | |
| 65 | + cmake --build cmake.output --target testrunner -- -j $(nproc) |
| 66 | + ./cmake.output/testrunner |
| 67 | +
|
| 68 | + - name: Run with libstdc++ debug mode |
| 69 | + if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'g++' |
| 70 | + run: | |
| 71 | + make clean |
| 72 | + make -j$(nproc) test selfcheck CXXFLAGS="-g3 -D_GLIBCXX_DEBUG" |
| 73 | +
|
| 74 | + - name: Run with libc++ hardening mode |
| 75 | + if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' |
| 76 | + run: | |
| 77 | + make clean |
| 78 | + make -j$(nproc) test selfcheck CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG" LDFLAGS="-lc++" |
0 commit comments