Skip to content

Commit

Permalink
ci: use actions/checkout, misc refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Sep 16, 2022
1 parent ef50f06 commit c232e79
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 65 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/nightly-build-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ on:
push:
branches:
- master
- update-ci
pull_request:
branches:
- master

env:
FC: ifort

jobs:
build_for_os:
name: compile code
Expand All @@ -38,9 +42,6 @@ jobs:
run:
shell: bash

env:
FC: ifort

steps:
- name: Checkout repo
uses: actions/[email protected]
Expand All @@ -58,47 +59,36 @@ jobs:
- name: Install ifort
uses: modflowpy/install-intelfortran-action@v1

- name: Clone MODFLOW 6 repo
run: |
git clone https://github.com/MODFLOW-USGS/modflow6.git modflow6
- name: Determine MODFLOW 6 branch
run: |
pwd
cd ./modflow6/
pwd
git branch
cd ../
pwd
ls ./
- name: Checkout modflow6
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6
path: modflow6

- name: Update flopy MODFLOW 6 classes
- name: Update flopy classes
working-directory: modflow6/autotest
run: |
python update_flopy.py
- name: Build and zip applications on linux and MacOS
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Build and zip
if: runner.os != 'Windows'
working-directory: modflow6/distribution
run: |
python build_nightly.py
- name: Build and zip applications on Windows
- name: Build and zip (Windows)
if: runner.os == 'Windows'
working-directory: modflow6/distribution
shell: cmd
run: |
export PATH="/C/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64":$PATH
python build_nightly.py
env:
VS_VER: vs2022
- name: Move the build zip file
run: |
ls -l ./modflow6/distribution/*
mv ./modflow6/distribution/temp_zip/${{ matrix.artifact_name }} ./${{ matrix.artifact_name }}
ls -l ./
# Build LaTeX document
- name: Copy the modflow6/docs directory
if: runner.os == 'Linux'
shell: python
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- master
- update-ci
pull_request:
branches:
- master
Expand Down Expand Up @@ -50,21 +51,13 @@ jobs:
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Clone MODFLOW 6 repo
run: |
git clone https://github.com/MODFLOW-USGS/modflow6.git modflow6
- name: Determine MODFLOW 6 branch
run: |
pwd
cd ./modflow6/
pwd
git branch
cd ../
pwd
ls ./
- name: Checkout modflow6
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6
path: modflow6

- name: Update flopy MODFLOW 6 classes
- name: Update flopy classes
working-directory: modflow6/autotest
run: |
python update_flopy.py
Expand All @@ -78,5 +71,4 @@ jobs:
run: |
ls -l ./modflow6/distribution/*
mv ./modflow6/distribution/temp_zip/${{ matrix.artifact_name }} ./${{ matrix.artifact_name }}
ls -l ./
ls -l ./
46 changes: 21 additions & 25 deletions .github/workflows/nightly-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ on:
push:
branches:
- master
- update-ci
pull_request:
branches:
- master

env:
FC: ifort

jobs:
build_for_os:
name: build distribution
Expand All @@ -38,9 +42,6 @@ jobs:
run:
shell: bash

env:
FC: ifort

steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -74,40 +75,35 @@ jobs:
cd ./usgslatex/usgsLaTeX
sudo ./install.sh --all-users
- name: Clone MODFLOW 6 repos
run: |
git clone --depth 1 https://github.com/MODFLOW-USGS/modflow6.git modflow6
git clone --depth 1 https://github.com/MODFLOW-USGS/modflow6-examples.git modflow6-examples
- name: Checkout modflow6
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6
path: modflow6

- name: Determine MODFLOW 6 branch
run: |
pwd
cd ./modflow6/
pwd
git branch
cd ../
pwd
ls ./
- name: Update flopy MODFLOW 6 classes
- name: Checkout modflow6 examples
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-examples
path: modflow6-examples

- name: Update flopy classes
working-directory: modflow6/autotest
run: |
python update_flopy.py
- name: Create MODFLOW 6 distribution (Linux/Mac)
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Create distribution
if: runner.os != 'Windows'
run: |
python make_distribution.py -mf6p ./modflow6 -mf6ep ./modflow6-examples -dp ./${{ runner.os }}
- name: Create MODFLOW 6 distribution (Windows)
- name: Create distribution (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
export PATH="/C/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64":$PATH
python make_distribution.py -mf6p ./modflow6 -mf6ep ./modflow6-examples -dp ./${{ runner.os }}
env:
VS_VER: vs2022
- name: Create an artifact of the distributions
- name: Create distribution artifact
uses: actions/[email protected]
with:
name: ${{ runner.os }}
Expand Down

0 comments on commit c232e79

Please sign in to comment.