Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging macos-13 build issue #37

Merged
merged 15 commits into from
Dec 31, 2024
44 changes: 27 additions & 17 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Integration testing
on:
workflow_dispatch:
env:
GCC_V: 12
INTEL_V: 2021.7
jobs:
test_modflow:
name: MODFLOW 6 integration tests
Expand Down Expand Up @@ -33,26 +36,27 @@ jobs:
cache-downloads: true
init-shell: bash

- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 12 || 2021.7 }}
- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }}
version: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 12 || 2021.7 }}
version: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}

- name: Set LDFLAGS (macOS)
if: matrix.os == 'macos-14'
- name: Setup Xcode CLT (macOS)
uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: ${{ contains(fromJSON('["macos-13"]'), matrix.os) && '14.3.1' || 'latest' }}

- name: Set LDFLAGS (ARM 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: Hide dylibs (macOS)
- name: Hide dylibs (ARM macOS)
if: matrix.os == 'macos-14'
run: |
version="12"
libpath="/opt/homebrew/opt/gcc@$version/lib/gcc/$version"
libpath="/opt/homebrew/opt/gcc@${{ env.GCC_V }}/lib/gcc/${{ env.GCC_V }}"
mv $libpath/libgfortran.5.dylib $libpath/libgfortran.5.dylib.bak
mv $libpath/libquadmath.0.dylib $libpath/libquadmath.0.dylib.bak
mv $libpath/libstdc++.6.dylib $libpath/libstdc++.6.dylib.bak
Expand Down Expand Up @@ -119,7 +123,12 @@ jobs:
sudo chmod +x modflow6/bin/downloaded/*
fi

- name: Check linked libs (macOS)
- name: Show programs
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
ls $ostag

- name: Check linked libs (ARM macOS)
if: matrix.os == 'macos-14'
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
Expand All @@ -140,9 +149,10 @@ jobs:
./code.json
./code.md

- name: Update flopy
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Test modflow6
working-directory: modflow6/autotest
run: |
python update_flopy.py
# when mf6.5.0 is released with new models and exes dist is updatd, remove filters below
pytest -v -n auto -k "not gwe and not swf and not prt" -m "not developmode" --durations 0
run: pytest -v -n auto -m "not developmode" --durations 0
38 changes: 21 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
workflow_dispatch:
env:
DIST: dist
GCC_V: 12
INTEL_V: 2021.7
jobs:
build:
name: Build distribution
Expand All @@ -25,22 +27,25 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 12 || 2021.7 }}
- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }}
version: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 12 || 2021.7 }}
version: ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}

- name: Set LDFLAGS (ARM mac)
- name: Setup Xcode CLT (macOS)
uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: ${{ contains(fromJSON('["macos-13"]'), matrix.os) && '14.3.1' || 'latest' }}

- name: Set LDFLAGS (ARM macOS)
if: matrix.os == 'macos-14'
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: Hide dylibs (ARM mac)
- name: Hide dylibs (ARM macOS)
if: matrix.os == 'macos-14'
run: |
version="12"
Expand All @@ -49,12 +54,6 @@ jobs:
mv $libpath/libquadmath.0.dylib $libpath/libquadmath.0.dylib.bak
mv $libpath/libstdc++.6.dylib $libpath/libstdc++.6.dylib.bak

- name: Setup Xcode CLT (mac)
uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: "15.0.1"

- uses: oprypin/find-latest-tag@v1
id: tag
with:
Expand Down Expand Up @@ -98,8 +97,13 @@ jobs:
fi
make-code-json --appdir $ostag --zip $ostag.zip --verbose

- name: Check linked libs (ARM mac)
if: matrix.os == 'macos-14'
- name: Show programs
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
ls $ostag

- name: Check linked libs (ARM macOS)
if: runner.os == 'macOS'
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
find $ostag -perm +111 -type f | xargs -I{} sh -c "otool -L {}"
Expand Down
Loading