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

refactor: accommodate recent pymake changes #26

Merged
merged 7 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@ jobs:
working-directory: modflow6/autotest
run: |
python update_flopy.py
pytest -v -n auto -k "not gwe" -m "not developmode" --durations 0
# 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
pip install -r requirements.txt
pip list

- name: Build executables
- name: Build programs
run: python scripts/build_programs.py

- name: Upload distribution archive
Expand Down
26 changes: 14 additions & 12 deletions scripts/build_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from modflow_devtools.ostags import get_modflow_ostag

DEFAULT_RETRIES = 3
DBL_PREC_PROGRAMS = ["mf2005", "mflgr", "mfnwt", "mfusg"]
DPRECISION_EXES = ["mf2005", "mflgr", "mfnwt", "mfusg"]


def get_fc() -> str:
Expand Down Expand Up @@ -73,19 +73,11 @@ def run_cmd(args) -> bool:
path = Path(args.path)
path.mkdir(parents=True, exist_ok=True)
zip_path = Path(path).with_suffix(".zip")
dp_programs = ",".join(DBL_PREC_PROGRAMS)
dp_exes = ",".join(DPRECISION_EXES)
retries = args.retries
fc = get_fc()
cc = get_cc()

assert run_cmd(
[
"make-code-json",
"-f",
str(path / "code.json"),
"--verbose",
]
), "could not make code.json"
assert run_cmd(
[
"make-program",
Expand All @@ -104,7 +96,7 @@ def run_cmd(args) -> bool:
assert run_cmd(
[
"make-program",
dp_programs,
dp_exes,
"--appdir",
path,
"--double",
Expand All @@ -116,5 +108,15 @@ def run_cmd(args) -> bool:
"--zip",
str(zip_path),
]
), f"could not build double precision binaries: {dp_programs}"
), f"could not build double precision binaries: {dp_exes}"
assert run_cmd(
[
"make-code-json",
"-ad", str(path),
"-f",
str(path / "code.json"),
"--verbose",
wpbonelli marked this conversation as resolved.
Show resolved Hide resolved
]
), "could not make code.json"
assert zip_path.is_file(), "could not build distribution zipfile"
print(f"created distribution zipfile: {zip_path}")
Loading