Skip to content

Commit

Permalink
[ci] add tests against keydb
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamScience committed May 17, 2024
1 parent 37bd140 commit 2472a3d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: smartredis
name: tests_ubuntu
defaults:
run:
shell: bash -o pipefail -i {0}
Expand All @@ -10,7 +10,7 @@ on:
- 'bugfix*'
- 'releases/**'
pull_request:
types: [opened, reopened]
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
debug_enabled:
Expand All @@ -22,6 +22,7 @@ on:
jobs:
build:
strategy:
fail-fast: false
matrix:
openfoam_version: ['2312', '2212', '2112']
smartsim_version: ['0.7.0', '0.6.2']
Expand All @@ -37,15 +38,16 @@ jobs:
env:
CATCH_TIMEOUT: 20
FOAM_FOAMUT: "/tmp/foamUT"
SSDB: "redis:6379"
SSDB: "smartdb:6379"

services:
redis:
image: redislabs/redisai
smartdb:
#image: ${{ matrix.database_backend == 'redis' && 'redislabs/redisai' || 'eqalpha/keydb' }}
image: 'redislabs/redisai'

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand All @@ -63,7 +65,7 @@ jobs:
run: |
source /usr/lib/openfoam/openfoam${{ matrix.openfoam_version }}/etc/bashrc
./Allwmake
export SSDB="redis:6379"
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
Expand Down
14 changes: 13 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ things work on the default toolchain versions (Compilers, system OpenMPI, ..., e
We use [Github Container Registry](https://ghcr.io/) to store the Docker images necessary for
CI workflows.

## Instructions
## Instructions for automated image builds

> [!NOTE]
> You will want to install ansible (locally) to build the images easily: `pip install ansible`.
Expand All @@ -30,3 +30,15 @@ CI workflows.
`strategy` section.
- For example, to add a new version of OpenFOAM, add the version to `jobs.build.strategy.matrix.openfoam_version`
- Then commit the changes to the repository.

## Instructions for manual image builds

```sh
cd docker
docker build \
--build-arg OPENFOAM_VERSION=2312 \
--build-arg UBUNTU_VERSION=22.04 \
--build-arg DATABASE_BACKEND=redis \
--build-arg SMARTSIM_VERSION=0.7.0 \
-t ghcr.io/<github_user>/openfoam-smartsim:of-2312-smartsim-0.7.0-redis-ubuntu-22.04 .
```
1 change: 1 addition & 0 deletions docker/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
set_fact:
database_backends:
- "redis"
- "keydb"

- name: Define list of Ubuntu versions
set_fact:
Expand Down

0 comments on commit 2472a3d

Please sign in to comment.