Skip to content

Commit

Permalink
Updates PYPY builds
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Jan 10, 2025
1 parent 221c4ad commit 6609203
Showing 1 changed file with 11 additions and 44 deletions.
55 changes: 11 additions & 44 deletions .github/workflows/build-test-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ jobs:
- 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: Set up macOS-specific paths and libraries
if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
run: |
Expand All @@ -79,24 +65,7 @@ jobs:
echo "LIBOMPPATH=$(brew --prefix libomp)" >> $GITHUB_ENV
echo "LLVMCLANG=$(brew --prefix llvm@15)" >> $GITHUB_ENV
# - name: Append appropriate gfortran version to PATH
# if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
# run: |
# echo "SEARCHPATH=$(brew --prefix gfortran-13):${PATH}" >> $GITHUB_ENV

# - name: Install libomp using brew
# if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
# run: |
# brew install libomp
# echo "LIBOMPPATH=$(brew --prefix libomp)" >> $GITHUB_ENV

# - name: Store LLVM compiler to env for macOS
# if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
# run: |
# echo "LLVMCLANG=$(brew --prefix llvm@15)" >> $GITHUB_ENV

- name: Build wheels
if: ${{ !(matrix.os == 'macos-14' && matrix.pyver == 'cp37') }}
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{matrix.pyver}}-*
Expand Down Expand Up @@ -127,27 +96,25 @@ jobs:
- 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'
- name: Set up macOS-specific paths and libraries
if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
run: |
# make sure gfortran is available
ln -s /opt/homebrew/bin/gfortran-13 /opt/homebrew/bin/gfortran
gfortran --version
# Symlink the correct gfortran compiler
ln -s '$HOMEBREW_PREFIX/bin/gfortran-13' '$HOMEBREW_PREFIX/bin/gfortran'
# Install OMP libraries
brew install libomp
# Link environments to env for later us with cibuildwheel
echo "LIBOMPPATH=$(brew --prefix libomp)" >> $GITHUB_ENV
echo "LLVMCLANG=$(brew --prefix llvm@15)" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: pp*
CIBW_SKIP: "pp37-* cp37-* *-win32 *-manylinux_i686"
CIBW_BEFORE_BUILD: pip install numpy 'forthon>=0.10.7' 'build<0.10.0'
CC: ${{ env.LLVMCLANG }}/bin/clang
LDFLAGS: "-L${{env.LIBOMPPATH }}/lib"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 6609203

Please sign in to comment.