Skip to content

Commit

Permalink
ci: update workflow file to use modflowpy/install-intelfortran-action (
Browse files Browse the repository at this point in the history
…#15)

Delete unnecessary intel scripts.
  • Loading branch information
jdhughes-usgs committed Dec 10, 2022
1 parent 94f06b1 commit 1276fd5
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 308 deletions.
45 changes: 26 additions & 19 deletions .github/common/build_executables.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import os
import sys
import pymake
import subprocess
import pathlib as pl

RETRIES = 3


def get_ostag() -> str:
Expand All @@ -27,30 +26,38 @@ def get_cctag() -> str:
raise ValueError(f"platform {sys.platform!r} not supported")


def mfpymake_run_command(args) -> bool:
success = False
for idx in range(RETRIES):
p = subprocess.run(args)
if p.returncode == 0:
success = True
break
print(f"{args[0]} run {idx + 1}/{RETRIES} failed...rerunning")
return success


if __name__ == "__main__":
path = (pl.Path(os.path.dirname(pymake.__file__)) / "../").resolve()
print(f"path to pymake: {path}")
cmd = [
"make-code-json",
"-f",
f"{get_ostag()}/code.json",
"--verbose",
]

file_path = pl.Path(".github/common/buildall.py")
if not mfpymake_run_command(cmd):
raise RuntimeError(f"could not run {cmd[0]}")

cmds = [
"python",
file_path,
cmd = [
"make-program",
":",
f"--appdir={get_ostag()}",
"-fc=ifort",
f"-cc={get_cctag()}",
f"--zip={get_ostag()}.zip",
"--keep",
]

retries = 3
success = False
for idx in range(retries):
p = subprocess.run(cmds)
if p.returncode == 0:
success = True
break
print(f"run {idx + 1}/{retries} failed...rerunning")
if not mfpymake_run_command(cmd):
raise RuntimeError("could not build the executables")

if not success:
raise RuntimeError("could not build the executables")
20 changes: 0 additions & 20 deletions .github/common/buildall.py

This file was deleted.

17 changes: 0 additions & 17 deletions .github/intel-scripts/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions .github/intel-scripts/cache_exclude_linux.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .github/intel-scripts/cache_exclude_windows.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .github/intel-scripts/ifortvars_linux.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .github/intel-scripts/ifortvars_macos.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/intel-scripts/ifortvars_windows.bat

This file was deleted.

23 changes: 0 additions & 23 deletions .github/intel-scripts/install_linux.sh

This file was deleted.

20 changes: 0 additions & 20 deletions .github/intel-scripts/install_macos.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .github/intel-scripts/install_windows.bat

This file was deleted.

0 comments on commit 1276fd5

Please sign in to comment.