|
78 | 78 | run: cmake --build build-runtime --config ${{ matrix.config }} |
79 | 79 | - name: Run tests |
80 | 80 | run: ctest --test-dir build-runtime -C ${{ matrix.config }} --output-on-failure |
| 81 | + windows-mingw-gcc: |
| 82 | + # Issue #211: GCC targeting Windows cannot realign the stack for AVX |
| 83 | + # spills, so libjxl's AVX2 decoder crashed under MinGW GCC while MSVC, |
| 84 | + # clang and Linux GCC were fine. Debug matters: -O0 spills every vector |
| 85 | + # temporary, which is where the reported crash came from. |
| 86 | + # This must be an upstream GCC. MSYS2 patches its GCC to default to |
| 87 | + # unaligned vector moves (0200-add-m-no-align-vector-insn-option-for-i386), |
| 88 | + # so the windows-msys2-gcc job below cannot reproduce the bug. The |
| 89 | + # runner's preinstalled C:\mingw64 is unpatched mingw-builds GCC, like |
| 90 | + # the WinLibs/mingw-builds toolchains users download. |
| 91 | + name: Windows MinGW GCC bundled codecs (${{ matrix.config }}) |
| 92 | + runs-on: windows-latest |
| 93 | + strategy: |
| 94 | + fail-fast: false |
| 95 | + matrix: |
| 96 | + config: [Debug, Release] |
| 97 | + defaults: |
| 98 | + run: |
| 99 | + shell: pwsh |
| 100 | + env: |
| 101 | + MINGW: C:/mingw64/bin |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v4 |
| 104 | + - name: Show the upstream GCC in use |
| 105 | + run: | |
| 106 | + & "$env:MINGW/gcc.exe" --version |
| 107 | + if ($LASTEXITCODE) { exit $LASTEXITCODE } |
| 108 | + & "$env:MINGW/gcc.exe" -Q --help=target | Select-String "align-vector" |
| 109 | + "$env:MINGW" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 |
| 110 | + "CMAKE_BUILD_PARALLEL_LEVEL=$([Environment]::ProcessorCount)" >> $env:GITHUB_ENV |
| 111 | + - name: Configure bundled codecs |
| 112 | + run: >- |
| 113 | + cmake -S . -B build -G "MinGW Makefiles" |
| 114 | + "-DCMAKE_C_COMPILER=$env:MINGW/gcc.exe" "-DCMAKE_CXX_COMPILER=$env:MINGW/g++.exe" |
| 115 | + -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=17 |
| 116 | + -DBUILD_TESTS=ON -DFREEIMAGE_STATIC=OFF |
| 117 | + -DBUILD_LIBHEIF=ON -DBUILD_LIBJXL=ON |
| 118 | + -DUSE_SYSTEM_LIBHEIF=OFF -DUSE_SYSTEM_LIBJXL=OFF |
| 119 | + -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=TRUE |
| 120 | + - name: Build |
| 121 | + run: cmake --build build |
| 122 | + - name: Test |
| 123 | + run: ctest --test-dir build --output-on-failure --timeout 300 |
| 124 | + windows-msys2-gcc: |
| 125 | + # Build coverage for MSYS2's own GCC with the bundled codecs. See the job |
| 126 | + # above for why this one cannot catch #211. |
| 127 | + name: Windows MSYS2 GCC bundled codecs (MINGW64, Debug, static) |
| 128 | + runs-on: windows-latest |
| 129 | + defaults: |
| 130 | + run: |
| 131 | + shell: msys2 {0} |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@v4 |
| 134 | + - name: Set up MSYS2 (MINGW64) |
| 135 | + uses: msys2/setup-msys2@v2 |
| 136 | + with: |
| 137 | + msystem: MINGW64 |
| 138 | + update: true |
| 139 | + install: >- |
| 140 | + mingw-w64-x86_64-toolchain |
| 141 | + mingw-w64-x86_64-cmake |
| 142 | + mingw-w64-x86_64-ninja |
| 143 | + perl |
| 144 | + - name: Configure bundled codecs |
| 145 | + run: >- |
| 146 | + cmake -S . -B build -G Ninja |
| 147 | + -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=17 |
| 148 | + -DBUILD_TESTS=ON -DFREEIMAGE_STATIC=ON |
| 149 | + -DBUILD_LIBHEIF=ON -DBUILD_LIBJXL=ON |
| 150 | + -DUSE_SYSTEM_LIBHEIF=OFF -DUSE_SYSTEM_LIBJXL=OFF |
| 151 | + -DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=TRUE |
| 152 | + - name: Build |
| 153 | + run: cmake --build build -j$(nproc) |
| 154 | + - name: Test |
| 155 | + run: ctest --test-dir build --output-on-failure --timeout 300 |
81 | 156 | linux-x86: |
82 | 157 | runs-on: ubuntu-24.04 |
83 | 158 | steps: |
|
0 commit comments