This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move inline install scripts back to files * make steps cross-platform where possible * replace set-output mechanism (soon deprecated) * test compile on bash, cmd and pwsh on Windows * save cache after install even if workflow fails * set env vars for HPC kit, FC and install location * add conventional commits to README and CONTRIBUTING * fix cache restore issue on windows * prepend MSVC linker bindir to system path * don't use GNU tar on Windows (can't unpack symlinks) * workaround libimf.so missing issue on Linux * make install location configurable * resolve relative paths and expand symlinks
- Loading branch information
Showing
12 changed files
with
475 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: MODFLOW 6 integration testing | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
schedule: | ||
- cron: '0 6 * * *' # run at 6 AM UTC every day | ||
jobs: | ||
test_build_modflow: | ||
name: Test build modflow6 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
env: [ pip, miniconda, micromamba ] | ||
defaults: | ||
run: | ||
shell: | ||
# necessary for miniconda and micromamba | ||
# https://github.com/mamba-org/provision-with-micromamba#important | ||
bash -l {0} | ||
steps: | ||
- name: Checkout action | ||
uses: actions/checkout@v3 | ||
- name: Checkout modflow6 | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: MODFLOW-USGS/modflow6 | ||
path: modflow6 | ||
- name: Setup Python | ||
if: matrix.env == 'pip' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Python dependencies | ||
if: matrix.env == 'pip' | ||
run: | | ||
pip3 install -r test/requirements.txt | ||
- name: Install miniconda environment | ||
if: matrix.env == 'miniconda' | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
environment-file: modflow6/environment.yml | ||
- name: Install micromamba environment | ||
if: matrix.env == 'micromamba' | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: modflow6/environment.yml | ||
cache-downloads: true | ||
cache-env: true | ||
- name: Install ifort | ||
uses: ./ | ||
with: | ||
path: ${{ runner.os != 'Windows' && 'bin' || 'C:\Program Files (x86)\Intel\oneAPI' }} | ||
- name: Build modflow6 (Linux & Mac) | ||
if: runner.os != 'Windows' | ||
working-directory: modflow6 | ||
run: | | ||
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin | ||
meson compile -v -C builddir | ||
meson install -C builddir | ||
- name: Add micromamba bindir to path (Windows) | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
$mamba_bin = "C:\Users\runneradmin\micromamba-root\envs\modflow6\Scripts" | ||
if (Test-Path $mamba_bin) { | ||
# ifort/micromamba interfere with one another's PATH settings | ||
echo $mamba_bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
} | ||
- name: Build modflow6 (Windows pwsh) | ||
if: runner.os == 'Windows' | ||
working-directory: modflow6 | ||
shell: pwsh | ||
run: | | ||
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin | ||
meson compile -v -C builddir | ||
meson install -C builddir | ||
- name: Build modflow6 (Windows cmd) | ||
if: runner.os == 'Windows' | ||
working-directory: modflow6 | ||
shell: cmd /C call {0} | ||
run: | | ||
meson setup builddir -Ddebug=false --prefix=%CD% --libdir=bin | ||
meson compile -v -C builddir | ||
meson install -C builddir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.