Symlinks llvm clang #3
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
name: Test wheel file build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} for Python ${{ matrix.pyver }} | |
# if: github.event_name == 'pull_request' | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14] | |
pyver: [cp311] | |
steps: | |
- name: Checks out repo | |
uses: actions/checkout@v4 | |
- name: Symlink gfortran for x86 macOS | |
if: matrix.os == 'macos-13' | |
run: | | |
# make sure gfortran is available | |
ln -s /usr/local/bin/gfortran-13 /usr/local/bin/gfortran | |
gfortran --version | |
- name: Symlink gfortran for ARM macOS | |
if: matrix.os == 'macos-14' | |
run: | | |
# make sure gfortran is available | |
ln -s /opt/homebrew/bin/gfortran-13 /opt/homebrew/bin/gfortran | |
gfortran --version | |
- name: Link to LLVM compiler for macOS | |
if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14') | |
run: | | |
export CC=$(brew --prefix llvm@15)/bin/clang | |
export CFLAGS=-I/$(brew --prefix llvm@15)/include | |
export LDFLAGS=-L/$(brew --prefix llvm@15)/lib | |
echo $CC | |
echo $CFLAGS | |
echo $LDFLAGS | |
ln -s /usr/bin/clang $(brew --prefix llvm@15)/bin/clang | |
- name: Build wheels | |
if: ${{ !(matrix.os == 'macos-14' && matrix.pyver == 'cp37') }} | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: ${{matrix.pyver}}-* | |
CIBW_SKIP: "pp37-* cp37-* *-win32 *-manylinux_i686" | |
CIBW_ARCHS_LINUX: auto | |
CIBW_BEFORE_BUILD: pip install numpy 'forthon>=0.10.7' 'build<0.10.0' | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ matrix.pyver }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |