-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use actions/checkout, misc refactoring
- Loading branch information
Showing
3 changed files
with
43 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,14 @@ on: | |
push: | ||
branches: | ||
- master | ||
- update-ci | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
FC: ifort | ||
|
||
jobs: | ||
build_for_os: | ||
name: compile code | ||
|
@@ -38,9 +42,6 @@ jobs: | |
run: | ||
shell: bash | ||
|
||
env: | ||
FC: ifort | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/[email protected] | ||
|
@@ -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 | ||
|
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 |
---|---|---|
|
@@ -16,10 +16,14 @@ on: | |
push: | ||
branches: | ||
- master | ||
- update-ci | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
FC: ifort | ||
|
||
jobs: | ||
build_for_os: | ||
name: build distribution | ||
|
@@ -38,9 +42,6 @@ jobs: | |
run: | ||
shell: bash | ||
|
||
env: | ||
FC: ifort | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
@@ -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 }} | ||
|