forked from Cantera/cantera
-
Notifications
You must be signed in to change notification settings - Fork 0
210 lines (205 loc) · 7.84 KB
/
post-merge-tests.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
name: Post-merge Tests
on:
workflow_dispatch: # allow manual triggering of this workflow
inputs:
outgoing_ref:
description: "The ref to be built. Can be a tag, commit hash, or branch name"
required: true
default: "main"
push:
# Run when the main branch is pushed to
branches:
- main
jobs:
prerelease-cython:
name: Pre-release Cython
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
HDF5_LIBDIR: /usr/lib/x86_64-linux-gnu/hdf5/serial
HDF5_INCLUDEDIR: /usr/include/hdf5/serial
steps:
- uses: actions/checkout@v3
name: Checkout the repository
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64
- name: Install Apt dependencies
run: |
sudo apt update
sudo apt install libboost-dev libopenblas-dev libhdf5-dev
- name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons numpy pandas pytest pint \
pytest-github-actions-annotate-failures graphviz
python3 -m pip install --pre cython
- name: Build Cantera
run: python3 `which scons` build env_vars=all
CXX=clang++-14 CC=clang-14 f90_interface=n extra_lib_dirs=/usr/lib/llvm/lib
-j2 debug=n --debug=time hdf_libdir=$HDF5_LIBDIR hdf_include=$HDF5_INCLUDEDIR
logging=debug
- name: Test Cantera
run:
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time
ubuntu-docker:
name: Docker 'ubuntu:${{ matrix.image }}' image
strategy:
matrix:
image: [devel, rolling]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ubuntu:${{ matrix.image }}
env:
HDF5_LIBDIR: /usr/lib/x86_64-linux-gnu/hdf5/serial
HDF5_INCLUDEDIR: /usr/include/hdf5/serial
steps:
- name: Install git on ubuntu:${{ matrix.image }}
run: |
apt update -y
apt install -y git
git config --global init.defaultBranch main
git config --global --add safe.directory /__w/cantera/cantera
- uses: actions/checkout@v3
name: Checkout the repository
with:
submodules: recursive
- name: Install Apt dependencies
# Use packages from ubuntu image when possible
run: |
apt install -y python3 python3-pip pipenv scons build-essential \
libboost-dev gfortran libopenmpi-dev libpython3-dev \
libblas-dev liblapack-dev libhdf5-dev libfmt-dev libyaml-cpp-dev \
libgtest-dev libgmock-dev libeigen3-dev libsundials-dev \
cython3 python3-numpy python3-pandas python3-pint python3-graphviz \
python3-ruamel.yaml python3-setuptools python3-wheel python3-pytest
gcc --version
- name: Install Python dependencies
run: |
pipenv install pytest-github-actions-annotate-failures
- name: Build Cantera
run: |
scons build env_vars=all -j2 debug=n --debug=time \
hdf_libdir=$HDF5_LIBDIR hdf_include=$HDF5_INCLUDEDIR \
system_eigen=y system_fmt=y system_sundials=y system_yamlcpp=y \
system_blas_lapack=y hdf_support=y f90_interface=y \
cc_flags=-D_GLIBCXX_ASSERTIONS
- name: Test Cantera
run:
scons test verbose_tests=yes --debug=time
fedora-docker:
name: Docker 'fedora:${{ matrix.image }}' image
strategy:
matrix:
image: [rawhide, latest]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: fedora:${{ matrix.image }}
steps:
- name: Install git on fedora:${{ matrix.image }}
run: |
dnf install -y git
git config --global init.defaultBranch main
git config --global --add safe.directory /__w/cantera/cantera
- uses: actions/checkout@v3
name: Checkout the repository
- name: Install dependencies
# Use packages from Fedora
run: |
dnf install -y boost-devel eigen3-devel fmt-devel gcc gcc-c++ \
gcc-fortran gmock-devel gtest-devel python3 python3-cython \
python3-devel python3-numpy python3-pandas python3-pint python3-pip \
python3-pytest python3-ruamel-yaml python3-scipy python3-scons \
python3-wheel sundials-devel yaml-cpp-devel hdf5-devel highfive-devel \
python3-graphviz
- name: Build Cantera
run: |
scons build -j2 debug=n --debug=time python_package=full f90_interface=y \
extra_inc_dirs=/usr/include/eigen3 libdirname=/usr/lib64 \
system_eigen=y system_fmt=y system_blas_lapack=y system_sundials=y \
system_yamlcpp=y system_blas_lapack=y hdf_support=y
# note: 'system_highfive=y' is omitted as the current packaged version is too old;
# once newer version is available in 'latest', this should be tested as well
- name: Test Cantera
run:
scons test verbose_tests=yes --debug=time
ubuntu-python-prerelease:
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.12']
os: ['ubuntu-20.04', 'ubuntu-22.04']
fail-fast: false
env:
HDF5_LIBDIR: /usr/lib/x86_64-linux-gnu/hdf5/serial
HDF5_INCLUDEDIR: /usr/include/hdf5/serial
steps:
- uses: actions/checkout@v3
name: Checkout the repository
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
allow-prereleases: true
- name: Install Apt dependencies
run: |
sudo apt update
sudo apt install libboost-dev gfortran libopenmpi-dev \
libblas-dev liblapack-dev libhdf5-dev libfmt-dev
gcc --version
- name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons numpy cython pandas pytest \
pytest-github-actions-annotate-failures pint graphviz
- name: Build Cantera
run: |
python3 `which scons` build env_vars=all -j2 debug=n --debug=time \
system_fmt=y hdf_libdir=$HDF5_LIBDIR hdf_include=$HDF5_INCLUDEDIR \
system_blas_lapack=y hdf_support=y cc_flags=-D_GLIBCXX_ASSERTIONS
- name: Test Cantera
run:
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time
macos-homebrew:
runs-on: macos-14
name: Install Latest Python with Homebrew
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
name: Checkout the repository
with:
submodules: recursive
# NumPy is installed here for the Python custom rate tests
- name: Install Brew dependencies
run: brew install --display-times boost libomp hdf5 python python-setuptools scons numpy
- name: Set Include folder
run: |
echo "BOOST_INC_DIR=$(brew --prefix)/include" >> $GITHUB_ENV
# This is necessary because of PEP 668 https://peps.python.org/pep-0668/
# PEP 668 prohibits installation to system Python packages via pip
- name: Create a virtualenv for dependencies
run: |
$(brew --prefix)/bin/python3.12 -m venv .venv
- name: Install Python dependencies
run: |
./.venv/bin/python -m pip install -U pip setuptools wheel build
./.venv/bin/python -m pip install ruamel.yaml numpy cython pandas pytest pytest-github-actions-annotate-failures pint graphviz
- name: Build Cantera
run: $(brew --prefix)/bin/scons build env_vars=all python_cmd="$(pwd)/.venv/bin/python" -j3 debug=n --debug=time boost_inc_dir=${BOOST_INC_DIR}
- name: Test Cantera
run: $(brew --prefix)/bin/scons test show_long_tests=yes verbose_tests=yes --debug=time