Merge remote-tracking branch 'upstream/develop' into ctopt #8
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_WISDEM | |
# We run CI on push commits and pull requests 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_conda: | |
name: Conda Build-Test (${{ matrix.os }} Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: False | |
matrix: | |
os: [ubuntu-latest, windows-latest] #macos-latest, | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: Install conda/mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
# https://github.com/marketplace/actions/setup-miniconda | |
with: | |
# To use mamba, uncomment here, comment out the miniforge line | |
#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 | |
# Install dependencies of WEIS specific to ubuntu | |
- name: Add dependencies ubuntu specific | |
if: false == contains( matrix.os, 'windows') | |
run: | | |
conda install -y petsc4py gfortran | |
# Install dependencies of WISDEM specific to windows | |
- name: Add dependencies windows specific | |
if: contains( matrix.os, 'windows') | |
run: | | |
conda install -y m2w64-toolchain libpython | |
- name: Debug config | |
run: | | |
conda list | |
which -a gfortran | |
which pip | |
# Install WISDEM with setup | |
# Note: For some reason, pip --no-deps doesn't find conda packages and downloads everything | |
- name: Install WISDEM with setup | |
run: | | |
python setup.py install | |
# Install WISDEM with pip | |
#- name: Install WISDEM with pip for Unix | |
# if: false == contains( matrix.os, 'windows') | |
# run: | | |
# python setup.py install | |
# Install WISDEM with pip | |
#- name: Install WISDEM with pip for Windows | |
# if: contains( matrix.os, 'windows') | |
# run: | | |
# python setup.py install | |
# Debugging session | |
#- name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# Run all tests | |
- name: Run tests | |
if: false == contains( matrix.os, 'windows') | |
run: | | |
pytest -p no:warnings --disable-warnings --cov=wisdem | |
# Run limited test on WINDOWS | |
- name: Limited Windows test | |
if: contains( matrix.os, 'windows') | |
run: | | |
cd wisdem/test/test_gluecode | |
pytest -p no:warnings --disable-warnings test_g* | |
# Run coveralls | |
- name: Run coveralls | |
if: contains( matrix.os, 'ubuntu') && contains( matrix.python-version, '3.10') | |
uses: coverallsapp/github-action@v2 | |
# This also works, https://github.com/AndreMiras/coveralls-python-action | |
#uses: AndreMiras/coveralls-python-action@develop | |
#env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#run: | | |
# coveralls --service=github | |
build_pip: | |
name: Pip Build-Test (${{ matrix.os }} Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: False | |
matrix: | |
os: [ubuntu-latest] #, windows-latest, macos-latest, | |
python-version: ["3.10"] | |
steps: | |
- name: Setup GNU Fortran | |
uses: awvwgk/setup-fortran@v1 | |
#with: | |
# compiler: intel-classic | |
- 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 | |
# Install WISDEM with setup | |
# Note: For some reason, pip --no-deps doesn't find conda packages and downloads everything | |
- name: Install WISDEM with setup | |
run: | | |
'${{ steps.cp.outputs.python-path }}' -m pip install --upgrade pip install pytest | |
'${{ steps.cp.outputs.python-path }}' -m pip install -vv . | |
# Run limited tests | |
- name: Limited test | |
run: | | |
cd wisdem/test/test_gluecode | |
pytest -p no:warnings --disable-warnings test_g* |