-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (67 loc) · 2.24 KB
/
ci.yaml
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
name: tests_ubuntu
defaults:
run:
shell: bash -o pipefail -i {0}
on:
push:
branches:
- main
- ci
- 'bugfix*'
- 'releases/**'
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Tmate debugging session'
required: false
default: false
jobs:
build:
strategy:
fail-fast: false
matrix:
openfoam_version: ['2312', '2212', '2112']
smartsim_version: ['0.7.0', '0.6.2']
database_backend: ['redis']
ubuntu_version: ['22.04', '20.04'] ## SmartSim not available yet for Python 3.12 on Ubuntu 24
exclude:
- ubuntu_version: '20.04' ## SmartSim 0.7.0 not released on ubuntu 20.04
smartsim_version: '0.7.0'
runs-on: ubuntu-22.04
container:
image: ghcr.io/foamscience/openfoam-smartsim:of-${{ matrix.openfoam_version }}-smart-${{ matrix.smartsim_version }}-${{ matrix.database_backend }}-ubuntu-${{ matrix.ubuntu_version }}
env:
CATCH_TIMEOUT: 20
FOAM_FOAMUT: "/tmp/foamUT"
SSDB: "smartdb:6379"
services:
smartdb:
#image: ${{ matrix.database_backend == 'redis' && 'redislabs/redisai' || 'eqalpha/keydb' }}
image: 'redislabs/redisai'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
detached: true
- name: Compile
run: |
source /usr/lib/openfoam/openfoam${{ matrix.openfoam_version }}/etc/bashrc
mkdir -p $FOAM_USER_LIBBIN
./Allwmake
- name: Compile Tests and Run
run: |
source /usr/lib/openfoam/openfoam${{ matrix.openfoam_version }}/etc/bashrc
./Allwmake
export SSDB="smartdb:6379"
git clone https://github.com/FoamScience/foamUT $FOAM_FOAMUT
sed -i 's/mpirun/mpirun --oversubscribe/g' $FOAM_FOAMUT/Alltest
ln -s "$PWD"/tests "$FOAM_FOAMUT"/tests/smartSimFOTests
cd $FOAM_FOAMUT || exit 1
rm -rf tests/exampleTests
./Alltest "$@"