-
Notifications
You must be signed in to change notification settings - Fork 54
91 lines (87 loc) · 3.06 KB
/
nightlies.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
name: Nightlies
on:
schedule:
# run daily at 5:00 am UTC (12 am ET/9 pm PT)
- cron: '0 5 * * *'
repository_dispatch:
# to run this, send a POST API call at repos/<user>/<repo>/dispatches with the specified event_type
# e.g. `gh repos/CCSI-Toolset/FOQUS/dispatches -F event_type=ci_run_nightlies`
types: [ci_run_nightlies]
workflow_dispatch:
defaults:
run:
# needed to be able to use
shell: bash -l {0}
jobs:
user-install-run:
name: Install/run (${{ matrix.foqus-install-target }}/${{ matrix.os }}/py${{ matrix.python-version }})
runs-on: ${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
# - '3.9'
os:
- linux
- win64
- macos
foqus-install-target:
- stable
- master
examples-release:
- '3.9.0'
include:
- os: macos
os-version: macos-12
- os: linux
os-version: ubuntu-20.04
- os: win64
os-version: windows-2019
- foqus-install-target: stable
pip-install-target: ccsi-foqus
- foqus-install-target: master
pip-install-target: https://github.com/CCSI-Toolset/FOQUS/archive/master.zip
- foqus-install-target: stable
os: win64
python-version: '3.8'
steps:
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
- name: Install FOQUS in a Conda env (user mode)
env:
py_ver: ${{ matrix.python-version }}
pip_install_target: ${{ matrix.pip-install-target }}
run: |
echo '::group::Output of conda create/activate/install'
conda create --name ccsi-foqus --quiet --yes -c conda-forge python="$py_ver" pywin32
conda activate ccsi-foqus
conda install --yes -c CCSI-Toolset -c conda-forge psuade-lite=1.9
echo '::endgroup::'
echo '::group::Output of pip install/list/show'
pip install --progress-bar off "$pip_install_target"
pip list
pip show ccsi-foqus PyQt5 pywin32
echo '::endgroup::'
- name: Apply hotfix commands
if: matrix.hotfix-command
run: |
conda activate ccsi-foqus
${{ matrix.hotfix-command }}
- name: Show foqus help
run: |
conda activate ccsi-foqus
foqus --help
- name: Download and test examples (${{ matrix.examples-release }})
env:
base_url: https://github.com/CCSI-Toolset/FOQUS/releases/download
release: ${{ matrix.examples-release }}
run: |
curl --silent --show-error -L "$base_url/$release/ccsi-foqus-$release-examples.zip" --output examples.zip
unzip -q examples.zip
echo '::group::Content of examples directory'
ls -Ralh "$PWD"/examples/
echo '::endgroup::'
conda activate ccsi-foqus
foqus --load ./examples/test_files/Optimization/Opt_Test_01.foqus --run opt --out test_opt.foqus