Skip to content

Commit

Permalink
ci: use actions/checkout, fix Windows path issue, misc refactoring
Browse files Browse the repository at this point in the history
wpbonelli committed Sep 16, 2022
1 parent ef50f06 commit 9d7ecef
Showing 3 changed files with 40 additions and 65 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/nightly-build-intel.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ on:
branches:
- master

env:
FC: ifort

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

env:
FC: ifort

steps:
- name: Checkout repo
uses: actions/checkout@v2.3.4
@@ -58,47 +58,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
23 changes: 7 additions & 16 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -50,21 +50,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
@@ -78,5 +70,4 @@ jobs:
run: |
ls -l ./modflow6/distribution/*
mv ./modflow6/distribution/temp_zip/${{ matrix.artifact_name }} ./${{ matrix.artifact_name }}
ls -l ./
ls -l ./
45 changes: 20 additions & 25 deletions .github/workflows/nightly-distribution.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ on:
branches:
- master

env:
FC: ifort

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

env:
FC: ifort

steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -74,40 +74,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/upload-artifact@v3.1.0
with:
name: ${{ runner.os }}

0 comments on commit 9d7ecef

Please sign in to comment.