Save progress of changes #21
Workflow file for this run
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
name: CI_rosco-compile | |
# We run CI on push commits on all branches | |
on: [push, pull_request] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build_pip: | |
name: Pip Build (${{ matrix.os }}) - ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false #true | |
matrix: | |
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Setup GNU Fortran | |
# if: false == contains( matrix.os, 'windows') | |
uses: awvwgk/setup-fortran@v1 #modflowpy/install-intelfortran-action@v1 # | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
id: cp | |
with: | |
python-version: ${{ matrix.python-version }} | |
update-environment: true | |
#- name: Setup tmate session | |
# if: contains( matrix.os, 'windows') | |
# uses: mxschmitt/action-tmate@v3 | |
# Install ZeroMQ- should be done via Conda | |
#- name: Install ZeroMQ | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install libzmq3-dev | |
- name: Pip Install ROSCO | |
run: | | |
'${{ steps.cp.outputs.python-path }}' -m pip install -vv -e . | |
# Re-generate registry | |
- name: Generate Registry | |
run: | | |
'${{ steps.cp.outputs.python-path }}' rosco/controller/rosco_registry/write_registry.py | |
- name: Test run | |
run: | | |
cd Examples | |
'${{ steps.cp.outputs.python-path }}' 01_turbine_model.py | |
build_and_test_conda: | |
name: Conda Build (${{ matrix.os }}) - ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: false #true | |
matrix: | |
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v2 | |
# https://github.com/marketplace/actions/setup-miniconda | |
with: | |
#mamba-version: "*" | |
miniforge-version: "latest" | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
environment-file: environment.yml | |
activate-environment: test | |
auto-activate-base: false | |
- name: Add dependencies windows specific | |
if: contains( matrix.os, 'windows') | |
run: | | |
conda install -y m2w64-toolchain libpython | |
gfortran --version | |
- name: Add dependencies mac specific | |
if: contains( matrix.os, 'mac') | |
run: | | |
conda install -y compilers | |
gfortran --version | |
# Install | |
- name: Debug | |
run: | | |
conda list | |
printenv | |
#- name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# detached: true | |
# if: contains( matrix.os, 'windows') | |
# Install | |
- name: Conda Install ROSCO | |
run: | | |
python -m pip install -vv -e . | |
# Install OpenFAST | |
- name: Install OpenFAST | |
run: | | |
conda install openfast==3.5.1 | |
- name: Add pyFAST dependency | |
run: | | |
conda install pyarrow chardet xarray | |
git clone http://github.com/OpenFAST/openfast_toolbox | |
cd openfast_toolbox | |
python -m pip install -e . | |
# Re-generate registry | |
- name: Generate Registry | |
run: | | |
python rosco/controller/rosco_registry/write_registry.py | |
# Run ROSCO Testing | |
- name: Run ROSCO testing | |
run: | | |
cd rosco/test | |
python ROSCO_testing.py | |
# Run checkpoint and all examples | |
- name: Run regression testing | |
if: contains( matrix.os, 'ubuntu') | |
run: | | |
cd rosco/test | |
pytest . | |
# Test walkthrough notebook | |
- name: Test walkthrough notebook | |
run: | | |
cd Examples | |
treon ROSCO_walkthrough.ipynb | |