Skip to content

Commit

Permalink
Merge pull request #260 from WISDEM/new_install
Browse files Browse the repository at this point in the history
All Conda install
  • Loading branch information
gbarter authored Jan 25, 2024
2 parents 0e204da + 77a878d commit 3a002bf
Show file tree
Hide file tree
Showing 2,986 changed files with 510 additions and 1,746,512 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/CI_WEIS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest"]
os: ["ubuntu-latest", "macOS-latest"] #, "windows-latest"]
python-version: ["3.9","3.10","3.11"]

steps:
Expand All @@ -38,43 +38,47 @@ jobs:
environment-file: environment.yml
activate-environment: test
auto-activate-base: false

# Install dependencies of WISDEM specific to mac # libgcc openblas libopenblas
- name: Add dependencies mac specific
if: contains( matrix.os, 'mac')
run: |
conda install -y petsc4py mpi4py openmpi compilers

# Install dependencies of WISDEM specific to windows
- name: Add dependencies windows specific
if: contains( matrix.os, 'windows')
run: |
conda install -y m2w64-toolchain libpython
conda install -y -c intel intel-openmp mkl
# Install dependencies of WEIS specific to ubuntu
- name: Add dependencies ubuntu specific
if: contains( matrix.os, 'ubuntu')
# (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries
# Mpi only seems to work with the shell command though, so instead rely on system compilers
if: false == contains( matrix.os, 'windows')
run: |
conda install -y petsc4py mpi4py openmpi
python -c "import platform; print(platform.node())"
- name: Add test packages
run: |
conda install -y pytest pytest-cov coveralls
- name: Show custom environment
run: |
conda list
which -a gfortran
printenv | sort
# Debugging session
#- name: Setup tmate session
# if: contains( matrix.os, 'mac')
# uses: mxschmitt/action-tmate@v3
# Install WEIS
- name: Install WEIS
run: |
python setup.py develop
pip install -e .
# Debugging session
#- name: Setup tmate session
# if: contains( matrix.os, 'windows')
# uses: mxschmitt/action-tmate@v3

#- name: Show openfast environment
# run: |
# which -a openfast
# cd /c/Miniconda3/envs/test/Library/bin/
# ls *fast*.exe
# ls *fast*.dll
# openfast -h
# python -c "import ctypes; ctypes.cdll.LoadLibrary('openfastlib.dll')"
# ls *fast*.dll
# cd examples/03_NREL5MW_OC3_spar
# python weis_driver.py

# List the collected tests for debugging purposes
- name: List tests
Expand All @@ -96,4 +100,3 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#run: |
# coveralls --service=github

75 changes: 3 additions & 72 deletions .github/workflows/run_exhaustive_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,87 +34,17 @@ jobs:
environment-file: environment.yml
activate-environment: test
auto-activate-base: false

#miniforge-variant: Mambaforge
#channels: conda-forge
#extra-specs: |
# python=${{ matrix.python-version }}
# mpi4py
# petsc4py
# openmpi
# sel(osx): compilers
# sel(win): m2w64-toolchain
# sel(win): libpython`

# # Even miniconda gets bogged down- try mamba
# - name: Install Conda environment with Micromamba
# uses: mamba-org/provision-with-micromamba@main
# with:
# environment-file: environment.yml
# environment-name: test
# channels: conda-forge
# extra-specs: |
# python=${{ matrix.python-version }}
# mpi4py
# petsc4py
# openmpi
# sel(osx): compilers
# sel(win): m2w64-toolchain
# sel(win): libpython`

# This is the more official way to do miniconda, but it messes with the GitHub worker environment and shell quite a bit
#- uses: conda-incubator/setup-miniconda@v2
# # https://github.com/marketplace/actions/setup-miniconda
# with:
# miniconda-version: "latest"
# channels: conda-forge
# auto-update-conda: true
# python-version: ${{ matrix.python-version }}
# environment-file: environment.yml
# activate-environment: test
# auto-activate-base: false

# This is a less official, but more lightweight way to do miniconda
#- uses: s-weigand/setup-conda@v1
# # https://github.com/marketplace/actions/setup-conda
# with:
# update-conda: true
# python-version: ${{ matrix.python-version }}
# conda-channels: conda-forge
# activate-conda: true
#- run: conda env update --file environment.yml

#- name: Show custom environment
# shell: bash
# run: |
# cat $GITHUB_ENV
# printenv

# Install dependencies of WISDEM specific to windows
#- name: Add dependencies mac specific
# if: contains( matrix.os, 'mac')
# run: |
# conda install -y compilers
# gfortran --version

# Install dependencies of WISDEM specific to windows
#- name: Add dependencies windows specific
# if: contains( matrix.os, 'windows')
# run: |
# conda install -y m2w64-toolchain libpython

# Install dependencies of WEIS specific to ubuntu
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
# (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries
# Mpi only seems to work with the shell command though, so instead rely on system compilers
run: |
conda install -y petsc4py mpi4py openmpi
# python -c "import platform; print(platform.node())"
- name: Show custom environment
run: |
conda list
printenv | sort
# Debugging session
#- name: Setup tmate session
Expand All @@ -123,12 +53,13 @@ jobs:
# Install WEIS
- name: Install WEIS
run: |
python setup.py develop
pip install -e .
# Test walkthrough notebook
- name: Test postprocessing notebooks
run: |
cd examples/16_postprocessing
pip install gdown
gdown --no-check-certificate 1AtLjjX5xpPqlHkfwDqeUj6VBMOYWcjmV
unzip outputs
treon plot_FAST.ipynb
Expand Down
30 changes: 0 additions & 30 deletions MoorPy/.github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

14 changes: 0 additions & 14 deletions MoorPy/.github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

28 changes: 0 additions & 28 deletions MoorPy/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

79 changes: 0 additions & 79 deletions MoorPy/.github/workflows/CI_MoorPy.yml

This file was deleted.

44 changes: 0 additions & 44 deletions MoorPy/.github/workflows/Publish_MoorPy.yml

This file was deleted.

Loading

0 comments on commit 3a002bf

Please sign in to comment.