Skip to content

Commit eb304b4

Browse files
committed
[ci] add tests against keydb
1 parent 37bd140 commit eb304b4

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: smartredis
1+
name: tests_ubuntu
22
defaults:
33
run:
44
shell: bash -o pipefail -i {0}
@@ -10,7 +10,7 @@ on:
1010
- 'bugfix*'
1111
- 'releases/**'
1212
pull_request:
13-
types: [opened, reopened]
13+
types: [opened, reopened, synchronize]
1414
workflow_dispatch:
1515
inputs:
1616
debug_enabled:
@@ -22,6 +22,7 @@ on:
2222
jobs:
2323
build:
2424
strategy:
25+
fail-fast: false
2526
matrix:
2627
openfoam_version: ['2312', '2212', '2112']
2728
smartsim_version: ['0.7.0', '0.6.2']
@@ -37,15 +38,15 @@ jobs:
3738
env:
3839
CATCH_TIMEOUT: 20
3940
FOAM_FOAMUT: "/tmp/foamUT"
40-
SSDB: "redis:6379"
41+
SSDB: "smartdb:6379"
4142

4243
services:
43-
redis:
44-
image: redislabs/redisai
44+
smartdb:
45+
image: ${{ matrix.database_backend == 'redis' && 'redislabs/redisai' || 'eqalpha/keydb' }}
4546

4647
steps:
4748
- name: Checkout repository
48-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
4950

5051
- name: Setup tmate session
5152
uses: mxschmitt/action-tmate@v3
@@ -63,7 +64,7 @@ jobs:
6364
run: |
6465
source /usr/lib/openfoam/openfoam${{ matrix.openfoam_version }}/etc/bashrc
6566
./Allwmake
66-
export SSDB="redis:6379"
67+
export SSDB="smartdb:6379"
6768
git clone https://github.com/FoamScience/foamUT $FOAM_FOAMUT
6869
sed -i 's/mpirun/mpirun --oversubscribe/g' $FOAM_FOAMUT/Alltest
6970
ln -s "$PWD"/tests "$FOAM_FOAMUT"/tests/smartSimFOTests

docker/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ things work on the default toolchain versions (Compilers, system OpenMPI, ..., e
1414
We use [Github Container Registry](https://ghcr.io/) to store the Docker images necessary for
1515
CI workflows.
1616

17-
## Instructions
17+
## Instructions for automated image builds
1818

1919
> [!NOTE]
2020
> You will want to install ansible (locally) to build the images easily: `pip install ansible`.
@@ -30,3 +30,15 @@ CI workflows.
3030
`strategy` section.
3131
- For example, to add a new version of OpenFOAM, add the version to `jobs.build.strategy.matrix.openfoam_version`
3232
- Then commit the changes to the repository.
33+
34+
## Instructions for manual image builds
35+
36+
```sh
37+
cd docker
38+
docker build \
39+
--build-arg OPENFOAM_VERSION=2312 \
40+
--build-arg UBUNTU_VERSION=22.04 \
41+
--build-arg DATABASE_BACKEND=redis \
42+
--build-arg SMARTSIM_VERSION=0.7.0 \
43+
-t ghcr.io/<github_user>/openfoam-smartsim:of-2312-smartsim-0.7.0-redis-ubuntu-22.04 .
44+
```

docker/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
set_fact:
3030
database_backends:
3131
- "redis"
32+
- "keydb"
3233

3334
- name: Define list of Ubuntu versions
3435
set_fact:

0 commit comments

Comments
 (0)