Skip to content

Deactivate tmate.

Deactivate tmate. #16

Workflow file for this run

name: Run turek-hron-fsi3 experiments
on:
push:
branches:
- ci-turek-hron-fsi3
# release:
# types: [published]
# workflow_dispatch:
jobs:
run_experiments:
strategy:
matrix:
experiment:
# - name: Figure 6.8 FEniCS-OpenFOAM legacy
# solid-participant: fenics
# solid-run: run_legacy.sh
# container: benjaminrodenberg/fenics-openfoam
# id: legacy
- name: Figure 6.8 FEniCS-OpenFOAM WI
solid-participant: fenics
solid-run: run_WI.sh
container: benjaminrodenberg/fenics-openfoam
id: WI
# - name: Figure 6.8 deal.II-OpenFOAM nonlin
# solid-participant: dealii
# solid-run: run.sh
# container: benjaminrodenberg/dealii-openfoam
# id: nonlin
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./turek-hron-fsi3
container: ${{ matrix.experiment.container }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# detached: true
# limit-access-to-actor: true
- name: Activate OpenFOAM # From https://github.com/gerlero/setup-openfoam/blob/68e0bf96c7f2aac1a100291a5d61fff934a472a8/action.yml#L54-L69
run: |
old_path="$PATH"
source /usr/lib/openfoam/openfoam2412/etc/bashrc || true
for var in "${!WM_@}"; do
echo "$var=${!var}" >> "$GITHUB_ENV"
done
for var in "${!FOAM_@}"; do
echo "$var=${!var}" >> "$GITHUB_ENV"
done
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
echo "${PATH/%:$old_path}" >> "$GITHUB_PATH"
- name: Install Dependencies
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip python3-venv git apt-utils pkg-config
rm -rf /var/lib/apt/lists/*
- name: Run tutorial
run: |
# start two processes in parallel
# 1) solid participant and
# 2) fluid participant (OpenFOAM must not be run as root!)
./prep_${{ matrix.experiment.solid-participant }}.sh
(
cd ./solid-${{ matrix.experiment.solid-participant }} &&
./${{ matrix.experiment.solid-run }}
) &
(
chown -R precice . &&
cd ./fluid-openfoam &&
su precice -c 'source /usr/lib/openfoam/openfoam2412/etc/bashrc && ./run.sh'
)
cp ./solid-${{ matrix.experiment.solid-participant }}/precice-Solid-watchpoint-Flap-Tip.log ./studies/precice-Solid-watchpoint-Flap-Tip-${{ matrix.experiment.id }}.log
- name: Store results
uses: actions/upload-artifact@v4
with:
name: turek-hron-fsi3 ${{ matrix.experiment.name }}
path: |
# working directory is ignored by actions/upload-artifact
./turek-hron-fsi3/studies
merge:
runs-on: ubuntu-latest
needs: run_experiments
steps:
- name: Merge results
uses: actions/upload-artifact/merge@v4
with:
name: turek-hron-fsi3