Skip to content

Commit

Permalink
Attempt to simplify gfortran setting for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Jan 10, 2025
1 parent 9a26eb8 commit 06a8342
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/build-test-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,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: 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: Append appropriate gfortran version to PATH
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
echo "SEARCHPATH=$(brew --prefix gfortran-13):${PATH}" >> $GITHUB_ENV
- name: Install libomp using brew
if: (matrix.os == 'macos-13') || (matrix.os == 'macos-14')
run: |
Expand All @@ -83,6 +88,7 @@ jobs:
if: ${{ !(matrix.os == 'macos-14' && matrix.pyver == 'cp37') }}
uses: pypa/[email protected]
env:
PATH: ${{ env.SEARCHPATH }}
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_SKIP: "pp37-* cp37-* *-win32 *-manylinux_i686"
CIBW_ARCHS_LINUX: auto
Expand Down

0 comments on commit 06a8342

Please sign in to comment.