Skip to content

Commit 2317473

Browse files
lazkajaraco
authored andcommitted
CI: explicitely CC/CXX for clang only mingw environments
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.
1 parent 1c196fe commit 2317473

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ jobs:
124124
strategy:
125125
matrix:
126126
include:
127-
- { sys: mingw64, env: x86_64 }
128-
- { sys: mingw32, env: i686 }
129-
- { sys: ucrt64, env: ucrt-x86_64 }
130-
- { sys: clang64, env: clang-x86_64 }
127+
- { sys: mingw64, env: x86_64, cc: gcc, cxx: g++ }
128+
- { sys: mingw32, env: i686, cc: gcc, cxx: g++ }
129+
- { sys: ucrt64, env: ucrt-x86_64, cc: gcc, cxx: g++ }
130+
- { sys: clang64, env: clang-x86_64, cc: clang, cxx: clang++}
131131
runs-on: windows-latest
132132
steps:
133133
- uses: actions/checkout@v4
@@ -155,6 +155,9 @@ jobs:
155155
pip install -e .[test]
156156
- name: Run tests
157157
shell: msys2 {0}
158+
env:
159+
CC: ${{ matrix.cc }}
160+
CXX: ${{ matrix.cxx }}
158161
run: |
159162
source /tmp/venv/bin/activate
160163
pytest

0 commit comments

Comments
 (0)