ci: switch to fortran-lang/setup-fortran #255
Workflow file for this run
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
name: Integration testing | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '**.md' | |
schedule: | |
- cron: '0 6 * * *' # run at 6 AM UTC every day | |
jobs: | |
test_modflow: | |
name: MODFLOW 6 integration tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-20.04, macos-latest, windows-2019 ] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
path: executables | |
- name: Checkout modflow6 | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6 | |
path: modflow6 | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: modflow6/environment.yml | |
cache-environment: true | |
cache-downloads: true | |
init-shell: >- | |
bash | |
powershell | |
- name: Setup Intel Fortran Classic | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: intel-classic | |
version: "2021.7" | |
- name: Build modflow6 | |
working-directory: modflow6 | |
run: | | |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin | |
meson install -C builddir | |
- name: Show meson build log | |
if: failure() | |
run: cat modflow6/builddir/meson-logs/meson-log.txt | |
- name: Update FloPy | |
working-directory: modflow6/autotest | |
run: python update_flopy.py | |
- name: Get executables | |
working-directory: modflow6/autotest | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: pytest -v -s get_exes.py | |
- name: Remove downloaded executables | |
if: runner.os != 'Windows' | |
working-directory: modflow6 | |
run: sudo rm -rf bin/downloaded/* | |
- name: Remove downloaded executables (Windows) | |
if: runner.os == 'Windows' | |
shell: pwsh | |
working-directory: modflow6 | |
run: rm -Force bin/downloaded/* | |
- name: Show pymake version | |
run: | | |
pip show mfpymake | |
python -c "import pymake; print(pymake.__version__)" | |
- name: Build executables | |
working-directory: executables/scripts | |
run: python build_executables.py -p ../../modflow6/bin/downloaded | |
- name: Set executable permission | |
if: runner.os != 'Windows' | |
working-directory: modflow6/bin/downloaded | |
run: | | |
sudo chmod +x * | |
ls -l | |
- name: Test modflow6 | |
working-directory: modflow6/autotest | |
run: pytest -v -n auto --durations 0 |