-
Notifications
You must be signed in to change notification settings - Fork 41
97 lines (81 loc) · 3.09 KB
/
run_exhaustive_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: run_exhaustive_examples
on: [pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }} Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
# if: "contains(github.event.head_commit.message, 'exhaustive_CI')" # This line could be used to have commit-specific instructions
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.9","3.10", "3.11", "3.12"]
steps:
- 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 mpi4py openmpi pyoptsparse
- name: Add test packages
run: |
conda install -y pytest pytest-cov coveralls treon
- name: Show custom environment
run: |
conda list
printenv | sort
# Debugging session
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# Install WEIS
- name: Install WEIS
run: |
python -m pip install --no-deps -e . -v
# 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
treon rev_DLCs_WEIS.ipynb
treon rev_Opt.ipynb
treon rev_WEIS_CSV.ipynb
# Run all examples
- name: Run tests within WEIS
run: |
cd weis/test
python run_examples.py
# Run scripts within rotor_opt folder with MPI
- name: Run parallel examples rotor optimization
run: |
cd examples/05_IEA-3.4-130-RWT
mpiexec -np 2 python weis_driver.py
# Run scripts within dac folder
# - name: Run examples distributed aerodynamic control
# run: |
# cd examples/dac_flaps
# python dac_driver.py
# Run scripts within design of experiments folder
- name: Run examples design of experiments
run: |
cd examples/09_design_of_experiments
mpiexec -n 2 --bind-to core python DOE_openfast.py
python postprocess_results.py