-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
12 changed files
with
271 additions
and
68 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 |
---|---|---|
@@ -0,0 +1,134 @@ | ||
name: pestpp continuous integration | ||
|
||
on: | ||
schedule: | ||
- cron: '0 8 * * *' # run at 8 AM UTC (12 am PST) | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
pestppCI: | ||
name: benchmarks | ||
runs-on: ubuntu-latest #${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
python-version: [3.8] # , 3.7, 3.6] | ||
run-type: [std] | ||
# test_repo: [""] | ||
# test_dir: [""] | ||
# test_script: [""] | ||
# include: | ||
# - test_script: opt_test.py | ||
# - test_repo: "https://github.com/pestpp/pestpp-opt_benchmarks" | ||
# - test_dir: "pestpp-opt_benchmarks" | ||
|
||
env: | ||
- { test_dir: "benchmarks", test_repo: "https://github.com/usgs/pestpp", test_script: "basic_tests.py"} | ||
- { test_dir: "pestpp-opt_benchmarks", test_repo: "https://github.com/pestpp/pestpp-opt_benchmarks", test_script: "opt_test.py"} | ||
- { test_dir: "pestpp-ies_benchmarks", test_repo: "https://github.com/pestpp/pestpp-ies_benchmarks", test_script: "ies_test_base.py"} | ||
- { test_dir: "pestpp-ies_benchmarks", test_repo: "https://github.com/pestpp/pestpp-ies_benchmarks", test_script: "ies_test_part1.py"} | ||
- { test_dir: "pestpp-ies_benchmarks", test_repo: "https://github.com/pestpp/pestpp-ies_benchmarks", test_script: "ies_test_part2.py"} | ||
- { test_dir: "pestpp-ies_benchmarks", test_repo: "https://github.com/pestpp/pestpp-ies_benchmarks", test_script: "ies_test_part3.py"} | ||
- { test_dir: "pestpp-ies_benchmarks", test_repo: "https://github.com/pestpp/pestpp-ies_benchmarks", test_script: "ies_test_part4.py"} | ||
- { test_dir: "pestpp-glm_benchmarks", test_repo: "https://github.com/pestpp/pestpp-glm_benchmarks", test_script: "glm_test_base.py"} | ||
env: ${{ matrix.env }} | ||
|
||
steps: | ||
|
||
- uses: actions/[email protected] | ||
# - name: Setup Ninja | ||
# if: ${{ runner.os == 'Windows' }} | ||
- uses: seanmiddleditch/gha-setup-ninja@master | ||
|
||
- name: Cache Miniconda | ||
uses: actions/[email protected] | ||
env: | ||
# Increase this value to reset cache if environment.yml has changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('etc/environment.yml') }} | ||
|
||
- name: Set Windows ENV | ||
if: runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
# - name: Get specific version CMake, v3.19 | ||
# if: ${{ runner.os == 'Windows' }} | ||
# uses: lukka/get-cmake@latest | ||
|
||
- name: clone test repo ${{ env.test_repo }} | ||
shell: bash -l {0} | ||
run: | | ||
git clone ${{ env.test_repo }} | ||
- name: PESTPP exe install | ||
shell: bash -l {0} | ||
run: | | ||
mkdir build && cd build | ||
if [[ "$RUNNER_OS" == "Windows" ]]; then | ||
cmake -GNinja -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Release .. | ||
ninja | ||
else | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
make -j2 | ||
fi | ||
cd .. | ||
# Standard python fails on windows without GDAL installation | ||
# Using custom bash shell ("shell: bash -l {0}") with Miniconda | ||
- name: Setup Miniconda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
mamba-version: "*" | ||
channels: conda-forge | ||
auto-update-conda: true | ||
activate-environment: pyemu | ||
use-only-tar-bz2: true | ||
|
||
- name: Add packages to pyemu environment using mamba or conda | ||
shell: bash -l {0} | ||
run: | | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
conda env update --name pyemu --file etc/environment.yml | ||
else | ||
mamba env update --name pyemu --file etc/environment.yml | ||
fi | ||
- name: Install Flopy & pyemu? | ||
shell: bash -l {0} | ||
run: | | ||
git clone -b develop --depth 1 https://github.com/modflowpy/flopy.git | ||
cd flopy | ||
python setup.py install | ||
cd .. | ||
pip install https://github.com/modflowpy/pymake/zipball/master | ||
git clone -b develop --depth 1 https://github.com/pypest/pyemu.git | ||
cd pyemu | ||
python setup.py install | ||
cd .. | ||
- name: aux bin path hackery | ||
shell: bash -l {0} | ||
run: | | ||
if [[ "$RUNNER_OS" == "Windows" ]]; then | ||
echo "..\..\test_bin\win" >> $GITHUB_PATH | ||
else | ||
echo "../../test_bin/linux" >> $GITHUB_PATH | ||
fi | ||
- name: run test script ${{ env.test_script }} in ${{ env.test_dir }} | ||
shell: bash -l {0} | ||
run: | | ||
ls -l | ||
cd ${{ env.test_dir }} | ||
nosetests -v ${{ env.test_script }} | ||
cd | ||
Binary file not shown.
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,12 @@ | ||
name: pyemu | ||
channels: | ||
- defaults | ||
dependencies: | ||
- numpy | ||
- pandas | ||
- pyshp | ||
- nose-timer | ||
- nbsphinx | ||
- matplotlib | ||
- coverage | ||
- scipy |
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
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
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
Oops, something went wrong.