@@ -11,19 +11,19 @@ jobs:
1111 strategy :
1212 fail-fast : false
1313 matrix :
14- os : [ ubuntu-22.04, macos-14, windows-2022 ]
14+ os : [ ubuntu-22.04, macos-14, macos-15-intel, windows-2022 ]
1515 defaults :
1616 run :
1717 shell : bash -l {0}
1818 steps :
1919
2020 - name : Checkout repo
21- uses : actions/checkout@v4
21+ uses : actions/checkout@v5
2222 with :
2323 path : executables
2424
2525 - name : Checkout modflow6
26- uses : actions/checkout@v4
26+ uses : actions/checkout@v5
2727 with :
2828 repository : MODFLOW-ORG/modflow6
2929 path : modflow6
@@ -38,28 +38,32 @@ jobs:
3838 working-directory : modflow6
3939 run : pixi run install
4040
41- - name : Setup ${{ contains(fromJSON('["macos-14 "]'), matrix .os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14 "]'), matrix .os) && env.GCC_V || env.INTEL_V }}
41+ - name : Setup ${{ contains(fromJSON('["macOS "]'), runner .os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macOS "]'), runner .os) && env.GCC_V || env.INTEL_V }}
4242 uses : fortran-lang/setup-fortran@v1
4343 with :
44- compiler : ${{ contains(fromJSON('["macos-14 "]'), matrix .os) && 'gcc' || 'intel-classic' }}
45- version : ${{ contains(fromJSON('["macos-14 "]'), matrix .os) && env.GCC_V || env.INTEL_V }}
44+ compiler : ${{ contains(fromJSON('["macOS "]'), runner .os) && 'gcc' || 'intel-classic' }}
45+ version : ${{ contains(fromJSON('["macOS "]'), runner .os) && env.GCC_V || env.INTEL_V }}
4646
4747 - name : Setup Xcode CLT (macOS)
4848 uses : maxim-lobanov/setup-xcode@v1
4949 if : runner.os == 'macOS'
5050 with :
51- xcode-version : ${{ contains(fromJSON('["macos-13"]'), matrix.os) && '14.3.1' || ' latest' }}
51+ xcode-version : ' latest'
5252
53- - name : Set LDFLAGS (ARM macOS)
53+ - name : Set LDFLAGS (macOS)
54+ if : runner.os == 'macOS'
5455 run : |
5556 ldflags="$LDFLAGS -Wl,-ld_classic"
5657 echo "LDFLAGS=$ldflags" >> $GITHUB_ENV
5758
58- - name : Hide dylibs (ARM macOS)
59- if : matrix .os == 'macos-14 '
59+ - name : Hide dylibs (macOS)
60+ if : runner .os == 'macOS '
6061 run : |
61- libpath="/opt/homebrew/opt/gcc@${{ env.GCC_V }}/lib/gcc/${{ env.GCC_V }}"
62- mv $libpath/libgfortran.5.dylib $libpath/libgfortran.5.dylib.bak
62+ version=${{ env.GCC_V }}
63+ brew_prefix="$(brew --prefix)"
64+ libpath="$brew_prefix/opt/gcc@$version/lib/gcc/$version"
65+ mv $libpath/libgcc_s.1.1.dylib $libpath/libgcc_s.1.1.dylib.bak
66+ mv $libpath/libgfortran.5.dylib $libpath/libgfortran.5.dylib.bak
6367 mv $libpath/libquadmath.0.dylib $libpath/libquadmath.0.dylib.bak
6468 mv $libpath/libstdc++.6.dylib $libpath/libstdc++.6.dylib.bak
6569
@@ -79,20 +83,27 @@ jobs:
7983 ostag=$(pixi run --manifest-path modflow6/pixi.toml python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
8084 echo "ostag=$ostag" >> $GITHUB_OUTPUT
8185
86+ - name : Fetch pre-built programs
87+ working-directory : executables
88+ run : |
89+ ostag="${{ steps.ostag.outputs.ostag }}"
90+ mkdir $ostag
91+ pixi run --manifest-path ../modflow6/pixi.toml python scripts/fetch_releases.py --manifest releases.json --ostag $ostag --outdir $ostag --zip $ostag.zip
92+
8293 - name : Build programs
8394 uses : nick-fields/retry@v3
8495 with :
8596 shell : bash
8697 timeout_minutes : 40
8798 command : |
8899 ostag="${{ steps.ostag.outputs.ostag }}"
89- mkdir $ostag
90- pixi run --manifest-path modflow6/pixi.toml make-program : --appdir $ostag --exclude gridgen --zip $ostag.zip --verbose
91- pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
100+ fetched=$(pixi run --manifest-path modflow6/pixi.toml python executables/scripts/fetch_releases.py --manifest executables/releases.json --list)
101+ pixi run --manifest-path modflow6/pixi.toml make-program : --appdir executables/ $ostag --exclude "$fetched" --zip executables/ $ostag.zip --verbose
102+ pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir executables/ $ostag --double --keep --zip executables/ $ostag.zip --verbose
92103 if [[ "${{ matrix.os }}" == "macos-14" ]]; then
93- pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
104+ pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir executables/ $ostag --keep --zip executables/ $ostag.zip --verbose --fflags='-O1'
94105 fi
95- pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir $ostag --zip $ostag.zip --verbose
106+ pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir executables/ $ostag --zip executables/ $ostag.zip --verbose
96107
97108 - name : Move programs
98109 run : |
@@ -101,7 +112,7 @@ jobs:
101112
102113 # move programs where mf6 autotests expect them
103114 mkdir modflow6/bin/downloaded
104- cp $ostag/* modflow6/bin/downloaded
115+ cp executables/ $ostag/* modflow6/bin/downloaded
105116
106117 # move mf6 binaries to top-level bindir in mf6 repo
107118 if [[ "$RUNNER_OS" == "Windows" ]]; then
@@ -114,9 +125,9 @@ jobs:
114125 eext=""
115126 oext=".dylib"
116127 fi
117- cp "$ostag/mf6$eext" modflow6/bin
118- cp "$ostag/libmf6$oext" modflow6/bin
119- cp "$ostag/zbud6$eext" modflow6/bin
128+ cp "executables/ $ostag/mf6$eext" modflow6/bin
129+ cp "executables/ $ostag/libmf6$oext" modflow6/bin
130+ cp "executables/ $ostag/zbud6$eext" modflow6/bin
120131
121132 # set execute permissions
122133 if [[ "$RUNNER_OS" != "Windows" ]]; then
@@ -127,28 +138,28 @@ jobs:
127138 - name : Show programs
128139 run : |
129140 ostag="${{ steps.ostag.outputs.ostag }}"
130- ls $ostag
141+ ls executables/ $ostag
131142
132- - name : Check linked libs (ARM macOS)
133- if : matrix .os == 'macos-14 '
143+ - name : Check linked libs (macOS)
144+ if : runner .os == 'macOS '
134145 run : |
135146 ostag="${{ steps.ostag.outputs.ostag }}"
136- find $ostag -perm +111 -type f | xargs -I{} sh -c "otool -L {}"
147+ find executables/ $ostag -perm +111 -type f | xargs -I{} sh -c "otool -L {}"
137148
138149 - name : Upload programs
139150 uses : actions/upload-artifact@v4
140151 with :
141152 name : ${{ steps.ostag.outputs.ostag }}
142- path : ${{ steps.ostag.outputs.ostag }}.zip
153+ path : executables/ ${{ steps.ostag.outputs.ostag }}.zip
143154
144155 - name : Upload metadata
145156 if : runner.os == 'Linux'
146157 uses : actions/upload-artifact@v4
147158 with :
148159 name : ${{ steps.ostag.outputs.ostag }}
149160 path : |
150- . /code.json
151- . /code.md
161+ executables /code.json
162+ executables /code.md
152163
153164 - name : Update flopy
154165 working-directory : modflow6
0 commit comments