Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROSCO 2.4.0 #78

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ _Select the appropriate type(s) that describe this PR_

## Examples/Testing, if applicable


73 changes: 73 additions & 0 deletions .github/workflows/CI_rosco-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI_rosco-compile

# We run CI on push commits on all branches
on: [push, pull_request]

# Specify FORTRAN compiler
env:
FORTRAN_COMPILER: gfortran-10

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.8"]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, general
auto-update-conda: true


- name: Add dependencies windows
if: true == contains( matrix.os, 'windows')
shell: bash -l {0}
run: |
conda install -y m2w64-toolchain
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/ROSCO/ROSCO/build

- name: Configure and Build - unix
if: false == contains( matrix.os, 'windows')
working-directory: ${{runner.workspace}}/ROSCO/ROSCO/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/ROSCO/ROSCO/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
..
cmake --build . --target install
- name: Configure and Build - windows
if: true == contains( matrix.os, 'windows')
working-directory: ${{runner.workspace}}/ROSCO/ROSCO/build
shell: bash -l {0}
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/ROSCO/ROSCO/install \
-G "MinGW Makefiles" \
..
cmake --build . --target install
# # Install ROSCO linux
# - name: Compile ROSCO linux
# if: false == contains( matrix.os, 'windows')
# working-directory: ${{runner.workspace}}/ROSCO/ROSCO/build

# # Install ROSCO windows
# - name: Compile ROSCO windows
# if: true == contains( matrix.os, 'windows')
# working-directory: ${{runner.workspace}}/ROSCO/ROSCO/build
# run: cmake --build . --target install -G "MinGW Makefiles"

163 changes: 163 additions & 0 deletions .github/workflows/CI_rosco-pytools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: CI_rosco-pytools

# We run CI on push commits on all branches
on: [push, pull_request]

# Specify FORTRAN compiler
env:
FC: gfortran

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, general
auto-update-conda: true
python-version: 3.8
environment-file: environment.yml


# Install dependencies of ROSCO toolbox
- name: Add dependencies windows specific
if: true == contains( matrix.os, 'windows')
run: |
conda install -y m2w64-toolchain libpython
- name: Add dependencies macOS specific
if: true == contains( matrix.os, 'macOS')
run: |
conda install compilers
# Install ROSCO toolbox
- name: Install ROSCO toolbox
run: |
python setup.py develop --compile-rosco
run_examples:
name: Run Examples
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, general
auto-update-conda: true
python-version: 3.8
environment-file: environment.yml


# Install dependencies of ROSCO toolbox
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
run: |
conda install -y wisdem
- name: Add dependencies windows specific
if: true == contains( matrix.os, 'windows')
run: |
conda install -y m2w64-toolchain libpython
conda install -y wisdem
# Install ROSCO toolbox
- name: Install ROSCO toolbox
run: |
python setup.py develop --compile-rosco
# Install OpenFAST
- name: Install OpenFAST
run: |
conda install openfast==3.0.0
# Run examples
- name: Run examples
run: |
cd Examples
python run_examples.py
run_testing:
name: Run Testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, general
auto-update-conda: true
python-version: 3.8
environment-file: environment.yml


# Install dependencies of ROSCO toolbox
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
run: |
conda install -y wisdem
# Install ROSCO toolbox
- name: Install ROSCO toolbox
run: |
python setup.py develop --compile-rosco
# Install OpenFAST
- name: Install OpenFAST
run: |
conda install openfast==3.0.0
# Run Testing
- name: Run testing
run: |
cd ROSCO_testing
python ROSCO_testing.py
62 changes: 0 additions & 62 deletions .github/workflows/CI_rosco.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Upload to PyPi

on:
release:
types: [released]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
if: startsWith(github.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
Loading