Skip to content

Commit

Permalink
CI: explicitely CC/CXX for clang only mingw environments
Browse files Browse the repository at this point in the history
MSYS2 has stopped installing gcc compatibility binaries in clang environments
by default some time ago, and distutils is currently hardcoded to look for "gcc",
while only cc/c++ and clang/clang++ are in PATH.

Work around for now by explicitely setting CC/CXX to override the defaults.

Idealy distutils would try to look harder for a valid compiler before giving up,
but this can be improved in the future.
  • Loading branch information
lazka authored and jaraco committed Jun 28, 2024
1 parent 1c196fe commit 2317473
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ jobs:
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
- { sys: mingw64, env: x86_64, cc: gcc, cxx: g++ }
- { sys: mingw32, env: i686, cc: gcc, cxx: g++ }
- { sys: ucrt64, env: ucrt-x86_64, cc: gcc, cxx: g++ }
- { sys: clang64, env: clang-x86_64, cc: clang, cxx: clang++}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -155,6 +155,9 @@ jobs:
pip install -e .[test]
- name: Run tests
shell: msys2 {0}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
source /tmp/venv/bin/activate
pytest
Expand Down

0 comments on commit 2317473

Please sign in to comment.