Skip to content

Commit

Permalink
use upload-artifact@v3, check zipfile exists
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Feb 15, 2024
1 parent d03a7e7 commit 37dfa80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
compiler: intel-classic
version: 2021.7

# only necessary because we need mf5to6 for mf6 autotests
- name: Build modflow6
working-directory: modflow6
run: |
Expand Down Expand Up @@ -81,15 +82,15 @@ jobs:
sudo chmod +x modflow6/bin/downloaded/*
fi
- name: Upload executables
uses: actions/upload-artifact@v4
- name: Upload programs
uses: actions/upload-artifact@v3
with:
name: executables
name: programs
path: ./*.zip

- name: Upload metadata
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: metadata
path: |
Expand Down
9 changes: 5 additions & 4 deletions scripts/build_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@


def get_fc() -> str:
"""Determine Intel Fortran compiler to use based on the current platform."""
return "ifort"


Expand Down Expand Up @@ -71,6 +72,8 @@ def run_cmd(args) -> bool:
keep = bool(args.keep)
path = Path(args.path)
path.mkdir(parents=True, exist_ok=True)
zip_path = Path(path).with_suffix(".zip")
dp_programs = ",".join(DBL_PREC_PROGRAMS)
retries = args.retries
fc = get_fc()
cc = get_cc()
Expand All @@ -83,7 +86,6 @@ def run_cmd(args) -> bool:
"--verbose",
]
), "could not make code.json"

assert run_cmd(
[
"make-program",
Expand All @@ -99,8 +101,6 @@ def run_cmd(args) -> bool:
]
+ (["--keep"] if keep else [])
), "could not build default precision binaries"

dp_programs = ",".join(DBL_PREC_PROGRAMS)
assert run_cmd(
[
"make-program",
Expand All @@ -114,6 +114,7 @@ def run_cmd(args) -> bool:
"-cc",
cc,
"--zip",
f"{path}.zip",
str(zip_path),
]
), f"could not build double precision binaries: {dp_programs}"
assert zip_path.is_file(), "could not build distribution zipfile"

0 comments on commit 37dfa80

Please sign in to comment.