Skip to content

Commit

Permalink
Merge pull request usgs#284 from jtwhite79/feat_ci
Browse files Browse the repository at this point in the history
Feat ci
  • Loading branch information
jtwhite79 authored Jan 19, 2024
2 parents 6367d97 + b215d0c commit e07ea82
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 44 deletions.
97 changes: 54 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,37 @@ jobs:

# Standard python fails on windows without GDAL installation
# Using custom bash shell ("shell: bash -l {0}") with Miniconda
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
# - name: Setup Miniconda
# uses: conda-incubator/setup-miniconda@v2
# with:
# # python-version: ${{ matrix.python-version }}
# # #mamba-version: "0.20.0"
# # channels: conda-forge
# # auto-update-conda: true
# # activate-environment: pyemu
# # use-only-tar-bz2: true
# miniforge-version: latest
# # miniconda-version: "latest"
# python-version: ${{ matrix.python-version }}
# # mamba-version: "*"
# # channels: conda-forge
# miniforge-variant: Mambaforge
# # auto-update-conda: true
# activate-environment: pyemu
# use-mamba: true
# # environment-file: etc/environment.yml
# # use-only-tar-bz2: true

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
# python-version: ${{ matrix.python-version }}
# #mamba-version: "0.20.0"
# channels: conda-forge
# auto-update-conda: true
# activate-environment: pyemu
# use-only-tar-bz2: true
miniforge-version: latest
# miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
# mamba-version: "*"
# channels: conda-forge
miniforge-variant: Mambaforge
# auto-update-conda: true
activate-environment: pyemu
use-mamba: true
# environment-file: etc/environment.yml
# use-only-tar-bz2: true
micromamba-version: '1.3.1-0'
environment-file: etc/environment.yml
init-shell: >-
bash
powershell
cache-environment: true
post-cleanup: 'all'

# - name: Add packages to pyemu environment using mamba or conda
# shell: bash -l {0}
Expand All @@ -98,32 +109,32 @@ jobs:
# conda env update --name pyemu --file etc/environment.yml
# fi

- name: Add packages to pyemu environment using conda
if: ${{ matrix.python-version < 3.8 }}
# if: ${{ runner.os == 'Windows' || matrix.python-version < 3.8 }}
shell: bash -l {0}
run: |
conda env update --name pyemu --file etc/environment.yml
# - name: Add packages to pyemu environment using conda
# if: ${{ matrix.python-version < 3.8 }}
# # if: ${{ runner.os == 'Windows' || matrix.python-version < 3.8 }}
# shell: bash -l {0}
# run: |
# conda env update --name pyemu --file etc/environment.yml

- name: Add packages to pyemu environment using mamba
# if: ${{ runner.os != 'Windows' && matrix.python-version >= 3.8 }}
if: ${{ matrix.python-version >= 3.8 }}
shell: bash -l {0}
run: |
mamba env update --name pyemu --file etc/environment.yml
# - name: Add packages to pyemu environment using mamba
# # if: ${{ runner.os != 'Windows' && matrix.python-version >= 3.8 }}
# if: ${{ matrix.python-version >= 3.8 }}
# shell: bash -l {0}
# run: |
# mamba env update --name pyemu --file etc/environment.yml

- 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: 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: Get specific version CMake, v3.19
# if: ${{ runner.os == 'Windows' }}
Expand Down
8 changes: 7 additions & 1 deletion etc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
# required
- python=3.9
- python<=3.11
- numpy>=1.15.0
- pandas
- scipy
Expand All @@ -21,3 +21,9 @@ dependencies:
- mfpymake
- imp
- nose
- pip
- git
- imp
- pip:
- git+https://github.com/pypest/pyemu.git@develop
- git+https://github.com/modflowpy/flopy.git

0 comments on commit e07ea82

Please sign in to comment.