Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 39 additions & 28 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-14, windows-2022 ]
os: [ ubuntu-22.04, macos-14, macos-15-intel, windows-2022 ]
defaults:
run:
shell: bash -l {0}
steps:

- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: executables

- name: Checkout modflow6
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: MODFLOW-ORG/modflow6
path: modflow6
Expand All @@ -38,28 +38,32 @@ jobs:
working-directory: modflow6
run: pixi run install

- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
- name: Setup ${{ contains(fromJSON('["macOS"]'), runner.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macOS"]'), runner.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) && env.GCC_V || env.INTEL_V }}
compiler: ${{ contains(fromJSON('["macOS"]'), runner.os) && 'gcc' || 'intel-classic' }}
version: ${{ contains(fromJSON('["macOS"]'), runner.os) && env.GCC_V || env.INTEL_V }}

- 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' }}
xcode-version: 'latest'

- name: Set LDFLAGS (ARM macOS)
- name: Set LDFLAGS (macOS)
if: runner.os == 'macOS'
run: |
ldflags="$LDFLAGS -Wl,-ld_classic"
echo "LDFLAGS=$ldflags" >> $GITHUB_ENV

- name: Hide dylibs (ARM macOS)
if: matrix.os == 'macos-14'
- name: Hide dylibs (macOS)
if: runner.os == 'macOS'
run: |
libpath="/opt/homebrew/opt/gcc@${{ env.GCC_V }}/lib/gcc/${{ env.GCC_V }}"
mv $libpath/libgfortran.5.dylib $libpath/libgfortran.5.dylib.bak
version=${{ env.GCC_V }}
brew_prefix="$(brew --prefix)"
libpath="$brew_prefix/opt/gcc@$version/lib/gcc/$version"
mv $libpath/libgcc_s.1.1.dylib $libpath/libgcc_s.1.1.dylib.bak
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 All @@ -79,20 +83,27 @@ jobs:
ostag=$(pixi run --manifest-path modflow6/pixi.toml python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
echo "ostag=$ostag" >> $GITHUB_OUTPUT

- name: Fetch pre-built programs
working-directory: executables
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
mkdir $ostag
pixi run --manifest-path ../modflow6/pixi.toml python scripts/fetch_releases.py --manifest releases.json --ostag $ostag --outdir $ostag --zip $ostag.zip

- name: Build programs
uses: nick-fields/retry@v3
with:
shell: bash
timeout_minutes: 40
command: |
ostag="${{ steps.ostag.outputs.ostag }}"
mkdir $ostag
pixi run --manifest-path modflow6/pixi.toml make-program : --appdir $ostag --exclude gridgen --zip $ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
fetched=$(pixi run --manifest-path modflow6/pixi.toml python executables/scripts/fetch_releases.py --manifest executables/releases.json --list)
pixi run --manifest-path modflow6/pixi.toml make-program : --appdir executables/$ostag --exclude "$fetched" --zip executables/$ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir executables/$ostag --double --keep --zip executables/$ostag.zip --verbose
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir executables/$ostag --keep --zip executables/$ostag.zip --verbose --fflags='-O1'
fi
pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir $ostag --zip $ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir executables/$ostag --zip executables/$ostag.zip --verbose

- name: Move programs
run: |
Expand All @@ -101,7 +112,7 @@ jobs:

# move programs where mf6 autotests expect them
mkdir modflow6/bin/downloaded
cp $ostag/* modflow6/bin/downloaded
cp executables/$ostag/* modflow6/bin/downloaded

# move mf6 binaries to top-level bindir in mf6 repo
if [[ "$RUNNER_OS" == "Windows" ]]; then
Expand All @@ -114,9 +125,9 @@ jobs:
eext=""
oext=".dylib"
fi
cp "$ostag/mf6$eext" modflow6/bin
cp "$ostag/libmf6$oext" modflow6/bin
cp "$ostag/zbud6$eext" modflow6/bin
cp "executables/$ostag/mf6$eext" modflow6/bin
cp "executables/$ostag/libmf6$oext" modflow6/bin
cp "executables/$ostag/zbud6$eext" modflow6/bin

# set execute permissions
if [[ "$RUNNER_OS" != "Windows" ]]; then
Expand All @@ -127,28 +138,28 @@ jobs:
- name: Show programs
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
ls $ostag
ls executables/$ostag

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

- name: Upload programs
uses: actions/upload-artifact@v4
with:
name: ${{ steps.ostag.outputs.ostag }}
path: ${{ steps.ostag.outputs.ostag }}.zip
path: executables/${{ steps.ostag.outputs.ostag }}.zip

- name: Upload metadata
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.ostag.outputs.ostag }}
path: |
./code.json
./code.md
executables/code.json
executables/code.md

- name: Update flopy
working-directory: modflow6
Expand Down
38 changes: 20 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
workflow_dispatch:
env:
DIST: dist
DIST: executables
GCC_V: 12
INTEL_V: 2021.7
jobs:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-2022]
os: [ubuntu-22.04, macos-14, macos-15-intel, windows-2022]
defaults:
run:
shell: bash
Expand All @@ -33,29 +33,31 @@ jobs:
repository: MODFLOW-ORG/modflow6
path: modflow6

- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
- name: Setup ${{ contains(fromJSON('["macOS"]'), runner.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macOS"]'), runner.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) && env.GCC_V || env.INTEL_V }}
compiler: ${{ contains(fromJSON('["macOS"]'), runner.os) && 'gcc' || 'intel-classic' }}
version: ${{ contains(fromJSON('["macOS"]'), runner.os) && env.GCC_V || env.INTEL_V }}

- 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' }}
xcode-version: 'latest'

- name: Set LDFLAGS (ARM macOS)
if: matrix.os == 'macos-14'
- name: Set LDFLAGS (macOS)
if: runner.os == 'macOS'
run: |
ldflags="$LDFLAGS -Wl,-ld_classic"
echo "LDFLAGS=$ldflags" >> $GITHUB_ENV

- name: Hide dylibs (ARM macOS)
if: matrix.os == 'macos-14'
- name: Hide dylibs (macOS)
if: runner.os == 'macOS'
run: |
version="12"
libpath="/opt/homebrew/opt/gcc@$version/lib/gcc/$version"
version=${{ env.GCC_V }}
brew_prefix="$(brew --prefix)"
libpath="$brew_prefix/opt/gcc@$version/lib/gcc/$version"
mv $libpath/libgcc_s.1.1.dylib $libpath/libgcc_s.1.1.dylib.bak
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 @@ -95,7 +97,7 @@ jobs:
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
mkdir $ostag
python3 scripts/fetch_releases.py --manifest releases.json --ostag $ostag --outdir $ostag --zip $ostag.zip
pixi run --manifest-path modflow6/pixi.toml python scripts/fetch_releases.py --manifest releases.json --ostag $ostag --outdir $ostag --zip $ostag.zip

- name: Build programs
uses: nick-fields/retry@v3
Expand All @@ -104,17 +106,17 @@ jobs:
timeout_minutes: 40
command: |
ostag="${{ steps.ostag.outputs.ostag }}"
fetched=$(python3 scripts/fetch_releases.py --manifest releases.json --list)
fetched=$(pixi run --manifest-path modflow6/pixi.toml python scripts/fetch_releases.py --manifest releases.json --list)
pixi run --manifest-path modflow6/pixi.toml make-program : --appdir $ostag --exclude "$fetched" --zip $ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir $ostag --zip $ostag.zip --verbose

- name: Show programs
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
ls $ostag

- name: Check linked libs (ARM macOS)
- name: Check linked libs (macOS)
if: runner.os == 'macOS'
run: |
ostag="${{ steps.ostag.outputs.ostag }}"
Expand All @@ -123,7 +125,7 @@ jobs:
- name: Upload distribution archive
uses: actions/upload-artifact@v4
with:
name: ${{ env.DIST }}-${{ matrix.os }}
name: ${{ env.DIST }}-${{ steps.ostag.outputs.ostag }}
path: ./*.zip

- name: Upload distribution metadata
Expand Down Expand Up @@ -185,7 +187,7 @@ jobs:
path: ${{ env.DIST }}

- name: List distribution files
run: ls -l ${{ steps.ostag.outputs.ostag }}
run: ls -l ${{ env.DIST }}

- name: Create release body header
shell: python
Expand Down
84 changes: 76 additions & 8 deletions releases.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[
{
"repo": "MODFLOW-ORG/modflow6",
"tag": "6.6.3",
"tag": "6.7.0",
"assets": {
"linux": "mf6.6.3_linux.zip",
"mac": "mf6.6.3_mac.zip",
"macarm": "mf6.6.3_macarm.zip",
"win64": "mf6.6.3_win64.zip"
"linux": "mf6.7.0_linux.zip",
"mac": "mf6.7.0_mac.zip",
"macarm": "mf6.7.0_macarm.zip",
"win64": "mf6.7.0_win64.zip"
},
"programs": {
"mf6": "mf6",
"zbud6": "zbud6",
"mf5to6": "mf5to6",
"libmf6": "libmf6"
}
},
Expand Down Expand Up @@ -67,16 +68,83 @@
}
},
{
"repo": "MODFLOW-ORG/mfusgt",
"tag": "v2.6.0",
"repo": "MODFLOW-ORG/mfnwt",
"tag": "v1.3.0",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"mfusg_gsi": "mfusgt"
"mfnwt": "mfnwt",
"mfnwtdbl": "mfnwtdbl"
}
},
{
"repo": "MODFLOW-ORG/swtv4",
"tag": "v4.00.05",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"swtv4": "swtv4"
}
},
{
"repo": "MODFLOW-ORG/modpath6",
"tag": "v6.0.1",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"mp6": "mp6"
}
},
{
"repo": "MODFLOW-ORG/vs2dt",
"tag": "v3.3",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"vs2dt": "vs2dt"
}
},
{
"repo": "MODFLOW-ORG/mflgr",
"tag": "v2.0.0",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"mflgr": "mflgr",
"mflgrdbl": "mflgrdbl"
}
},
{
"repo": "MODFLOW-ORG/mf2000",
"tag": "v1.19.01",
"assets": {
"linux": "linux.zip",
"mac": "mac.zip",
"macarm": "macarm.zip",
"win64": "win64.zip"
},
"programs": {
"mf2000": "mf2000"
}
}
]