-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjustign archs + compilers right before build
- Loading branch information
Showing
2 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,11 @@ jobs: | |
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 | ||
buildplat: | ||
# should also be able to do multi-archs on a single entry, e.g. | ||
# [windows-2019, win*, "AMD64 x86"]. However, those two require a different compiler setup | ||
# so easier to separate out here. | ||
- [ubuntu-22.04, manylinux, x86_64] | ||
- [ubuntu-22.04, musllinux, x86_64] | ||
- [macos-11, macosx, x86_64] | ||
- [windows-2019, AMD64] | ||
# [os-image, os-name, os-arch] | ||
- [ubuntu-latest, manylinux, x86_64] | ||
- [ubuntu-latest, musllinux, x86_64] | ||
- [macos-latest, macosx, x86_64] | ||
- [windows-latest, win, AMD64] | ||
# os: [windows-latest] | ||
# cibw_arch: ["AMD64"] | ||
# cibw_python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"] | ||
|
@@ -45,16 +44,26 @@ jobs: | |
run: | | ||
python -m pip install cibuildwheel | ||
- name: Set compiler | ||
run: | | ||
if [ ${{ matrix.buildplat[1] }} == 'macosx' ]; then | ||
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV | ||
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV | ||
elif [ ${{ matrix.buildplat[1] }} == 'win' ]; then | ||
echo "CC=gcc" >> $GITHUB_ENV | ||
echo "CXX=g++" >> $GITHUB_ENV | ||
fi | ||
$CXX --version | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}* | ||
CIBW_ARCHS: ${{ matrix.buildplat[2] }} | ||
# define CC, CXX so meson will use clang-cl instead of MSVC | ||
# CC: clang-cl | ||
# CXX: clang-cl | ||
# CC: gcc | ||
# CXX: g++ | ||
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}* | ||
CIBW_ARCHS: ${{ matrix.buildplat[2] }} | ||
# -Wl,-S equivalent to gcc's -Wl,--strip-debug | ||
# LDFLAGS: "-Wl,-S" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters