diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index fa13d85..1e58b3b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -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 @@ -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 @@ -79,6 +83,13 @@ 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: @@ -86,13 +97,13 @@ jobs: 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: | @@ -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 @@ -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 @@ -127,19 +138,19 @@ 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' @@ -147,8 +158,8 @@ jobs: with: name: ${{ steps.ostag.outputs.ostag }} path: | - ./code.json - ./code.md + executables/code.json + executables/code.md - name: Update flopy working-directory: modflow6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 623e731..fc1a20c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: - master workflow_dispatch: env: - DIST: dist + DIST: executables GCC_V: 12 INTEL_V: 2021.7 jobs: @@ -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 @@ -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 @@ -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 @@ -104,9 +106,9 @@ 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 @@ -114,7 +116,7 @@ jobs: 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 }}" @@ -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 @@ -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 diff --git a/releases.json b/releases.json index 1df0931..6ff2542 100644 --- a/releases.json +++ b/releases.json @@ -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" } }, @@ -67,8 +68,8 @@ } }, { - "repo": "MODFLOW-ORG/mfusgt", - "tag": "v2.6.0", + "repo": "MODFLOW-ORG/mfnwt", + "tag": "v1.3.0", "assets": { "linux": "linux.zip", "mac": "mac.zip", @@ -76,7 +77,74 @@ "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" } } ]