Skip to content

Commit

Permalink
ci: fix compiler compatibility workflow (#2190)
Browse files Browse the repository at this point in the history
Use LDFLAGS workaround to select classic linker on macOS. Also add gcc14 to test matrix.
  • Loading branch information
wpbonelli authored Feb 2, 2025
1 parent 15445b6 commit fd3d86a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,8 @@ jobs:
- name: Set LDFLAGS (macOS)
if: runner.os == 'macOS'
run: |
os_ver=$(sw_vers -productVersion | cut -d'.' -f1)
if (( "$os_ver" > 12 )); then
ldflags="$LDFLAGS -Wl,-ld_classic"
echo "LDFLAGS=$ldflags" >> $GITHUB_ENV
fi
ldflags="$LDFLAGS -Wl,-ld_classic"
echo "LDFLAGS=$ldflags" >> $GITHUB_ENV
- name: Build MF6
working-directory: modflow6
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
- {os: ubuntu-22.04, compiler: gcc, version: 11}
- {os: ubuntu-22.04, compiler: gcc, version: 12}
- {os: ubuntu-22.04, compiler: gcc, version: 13}
- {os: ubuntu-22.04, compiler: gcc, version: 14}
- {os: macos-13, compiler: gcc, version: 11}
- {os: macos-13, compiler: gcc, version: 12}
- {os: macos-13, compiler: gcc, version: 13}
- {os: macos-14, compiler: gcc, version: 11}
- {os: macos-14, compiler: gcc, version: 12}
- {os: macos-14, compiler: gcc, version: 13}
- {os: macos-14, compiler: gcc, version: 14}
- {os: windows-2022, compiler: gcc, version: 11}
- {os: windows-2022, compiler: gcc, version: 12}
- {os: windows-2022, compiler: gcc, version: 13}
Expand Down Expand Up @@ -106,6 +108,12 @@ jobs:
working-directory: modflow6
run: pixi run install

- name: Set LDFLAGS (macOS)
if: runner.os == 'macOS'
run: |
ldflags="$LDFLAGS -Wl,-ld_classic"
echo "LDFLAGS=$ldflags" >> $GITHUB_ENV
- name: Build modflow6
working-directory: modflow6
run: |
Expand Down

0 comments on commit fd3d86a

Please sign in to comment.