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

ci: update workflow file to use modflowpy/install-intelfortran-action #15

Merged
merged 6 commits into from
Dec 10, 2022
Prev Previous commit
Next Next commit
ci: update workflow file to use modflowpy/install-intelfortran-action
Delete unnecessary intel scripts.
  • Loading branch information
jdhughes-usgs committed Dec 10, 2022
commit 3db4ac301e4d35adb45d928967d96fac186209e0
10 changes: 8 additions & 2 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ jobs:
run: |
pip list

- name: build executables on Linux, macOS, and Windows
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: build executables on Linux and macOS
if: runner.os != 'Windows'
run: |
python .github/common/build_executables.py

- name: build executables on Windows
if: runner.os == 'Windows'
shell: cmd
run: |
python .github/common/build_executables.py

Expand Down
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# MODFLOW EXECUTABLES

The purpose of this repository is to distribute binary executable programs for MODFLOW and related programs that will run on Windows, Mac, and Linux operating systems. Executables for these different operating systems can be found under the [release](https://github.com/MODFLOW-USGS/executables/releases) tab above and are named:
The purpose of this repository is to distribute binary executable programs for MODFLOW and related programs that will run on Windows, Mac, and Linux operating systems. These programs are compiled using [pymake](https://github.com/modflowpy/pymake) and the Intel OneAPI compilers. The release also includes a json file ([code.json](https://github.com/MODFLOW-USGS/executables/releases/latest/download/code.json)) that includes the current version number and the url address that can be used to download the source files used to build these programs.

Executables for these different operating systems can be found under the [release](https://github.com/MODFLOW-USGS/executables/releases) tab above and are named:

* [win64.zip](https://github.com/MODFLOW-USGS/executables/releases/latest/download/win64.zip)
* [mac.zip](https://github.com/MODFLOW-USGS/executables/releases/latest/download/mac.zip)
Expand All @@ -10,28 +12,23 @@ The programs, version numbers, and the date stamp on the downloaded file used to

| Program | Version | UTC Date |
| ------- | ------- | ---- |
| mf6 | 6.4.0 | 12/01/2022 |
| zbud6 | 6.4.0 | 12/01/2022 |
| libmf6 | 6.4.0 | 12/01/2022 |
| mp7 | 7.2.001 | 10/23/2018 |
| mt3dms | 5.3.0 | 02/21/2010 |
| mt3dusgs | 1.1.0 | 07/12/2019 |
| vs2dt | 3.3 | 04/02/2018 |
| triangle | 1.6 | 07/29/2005 |
| gridgen | 1.0.02 | 10/24/2018 |
| crt | 1.3.1 | 04/11/2017 |
| sutra | 3.0 | 08/20/2019 |
| gridgen | 1.0.02 | 10/24/2018 |
| libmf6 | 6.4.1 | 12/09/2022 |
| mf2000 | 1.19.01 | 03/30/2010 |
| mf2005 | 1.12.00 | 12/07/2021 |
| mf6 | 6.4.1 | 12/09/2022 |
| mflgr | 2.0.0 | 09/20/2013 |
| mfnwt | 1.3.0 | 09/07/2022 |
| mfusg | 1.5 | 02/27/2019 |
| zonbudusg | 1.5 | 02/27/2019 |
| swtv4 | 4.00.05 | 10/24/2018 |
| mp6 | 6.0.1 | 10/23/2018 |
| mflgr | 2.0.0 | 09/20/2013 |
| mp7 | 7.2.001 | 10/23/2018 |
| mt3dms | 5.3.0 | 02/21/2010 |
| mt3dusgs | 1.1.0 | 07/12/2019 |
| sutra | 3.0 | 08/20/2019 |
| swtv4 | 4.00.05 | 10/24/2018 |
| triangle | 1.6 | 07/29/2005 |
| vs2dt | 3.3 | 04/02/2018 |
| zbud6 | 6.4.1 | 12/09/2022 |
| zonbud3 | 3.01 | 10/25/2018 |
| mfnwt | 1.3.0 | 09/07/2022 |



These programs are compiled using [pymake](https://github.com/modflowpy/pymake) and the Intel OneAPI compilers. The release also includes a json file ([code.json](https://github.com/MODFLOW-USGS/executables/releases/latest/download/code.json)) that includes the current version number and the url address that can be used to download the source files used to build these programs.

| zonbudusg | 1.5 | 02/27/2019 |
46 changes: 46 additions & 0 deletions update_readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import subprocess
import pathlib as pl

target_file = pl.Path("code.md")
TAG = "| Program | Version | UTC Date |"
FILES = ("code.json", "code.md")


def _create_code_json() -> None:
subprocess.run(
[
"make-code-json",
"-f",
f"code.json",
"--verbose",
]
)

if not target_file.is_file():
raise FileNotFoundError(f"{target_file} does not exist")


def _update_readme() -> None:
with open("README.md", "r") as f:
readme_md = f.read().splitlines()
with open("code.md", "r") as f:
code_md = f.read().splitlines()
with open("README.md", "w") as f:
for line in readme_md:
if TAG not in line:
f.write(f"{line}\n")
else:
for code_line in code_md:
f.write(f"{code_line}\n")
break


def _clean_files() -> None:
for file in FILES:
pl.Path(file).unlink()


if __name__ == "__main__":
_create_code_json()
_update_readme()
_clean_files()