Skip to content

Commit

Permalink
Fix CI for Windows MinGW builds
Browse files Browse the repository at this point in the history
  • Loading branch information
500-internal-server-error committed Feb 19, 2025
1 parent 6fe45fb commit 300d4e0
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ jobs:
brew install ${{ matrix.config.packages }}
- name: Configure project
if: matrix.config.msystem == ''
shell: bash
run: |
export CC=${{ matrix.config.cc }}
Expand All @@ -171,12 +172,43 @@ jobs:
args+=(-DCMAKE_INSTALL_PREFIX:PATH=install)
cmake "${args[@]}"
- name: Configure project (MSYS2)
if: matrix.config.msystem != ''
shell: msys2 {0}
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
ninja --version
cmake --version
mkdir build
mkdir install
args=(-G "${{ matrix.config.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }})
[[ "${{ matrix.config.build_type }}" == "Debug" ]] && args+=(-DGHC_COVERAGE=ON)
[[ -n "${{ matrix.config.msystem }}" ]] && args+=(-DGHC_FILESYSTEM_BUILD_STD_TESTING=NO)
args+=(-DCMAKE_INSTALL_PREFIX:PATH=install)
cmake "${args[@]}"
- name: Build project
if: matrix.config.msystem == ''
shell: bash
run: |
cmake --build build --config ${{ matrix.config.build_type }}
- name: Build project (MSYS2)
if: matrix.config.msystem != ''
shell: msys2 {0}
run: |
cmake --build build --config ${{ matrix.config.build_type }}
- name: Run tests
if: matrix.config.msystem == ''
shell: bash
run: |
cd build && ctest -C ${{ matrix.config.build_type }}
- name: Run tests (MSYS2)
if: matrix.config.msystem != ''
shell: msys2 {0}
run: |
cd build && ctest -C ${{ matrix.config.build_type }}
Expand Down

0 comments on commit 300d4e0

Please sign in to comment.