Skip to content

check if tests fail if no pipefail option is set #6

check if tests fail if no pipefail option is set

check if tests fail if no pipefail option is set #6

name: Integration Tests
env:
BUILD_TYPE: Release
FOAM_INST_DIR: /root/OpenFOAM
WM_PROJECT: OpenFOAM
WM_OPTIONS: linux64GccDPInt32Opt
WM_COMPILER_TYPE: system
WM_COMPILER: Gcc
WM_PRECISION_OPTION: DP
WM_LABEL_SIZE: 32
WM_COMPILE_OPTION: Opt
WM_OSTYPE: POSIX
WM_ARCH: linux64
WM_ARCH_OPTION: 64
WM_LINK_LANGUAGE: c++
WM_LABEL_OPTION: Int32
WM_MPLIB: SYSTEMOPENMPI
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
MPI_BUFFER_SIZE: 20000000
on:
workflow_call:
inputs:
path:
required: true
type: string
version:
required: true
type: string
cyclic_case:
required: true
type: string
foam_user_libbin:
required: true
type: string
run-name: Integration test on ${{github.ref_name}}
env:

Check failure on line 40 in .github/workflows/integration-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/integration-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 40
BUILD_TYPE: Release
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
OBR_RUN_CMD: "mpirun --oversubscribe --bind-to core --map-by core -np {np} {solver} -parallel -case {path}/case > {path}/case/{solver}_{timestamp}.log 2>&1"
MPI_BUFFER_SIZE: 20000000
GINKGO_EXECUTOR: reference
jobs:
setup_integration_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
echo "matrix=[\"cavity\", \"channel\"]" >> $GITHUB_OUTPUT
setup:
runs-on: ubuntu-latest
container: greole/ofbase
needs: setup_integration_matrix
name: setup-${{matrix.Case}}-${{inputs.version}}
strategy:
fail-fast: false
matrix:
Case: ${{fromJson(needs.setup_integration_matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- name: Cache workspace
uses: actions/cache@v3
with:
key: ws-${{inputs.version}}-${{matrix.Case}}-${{ github.sha }}
path: /home/runner/work/_temp/_github_home/${{matrix.Case}}
- name: Update OBR
working-directory: /github/home/
run: |
ls
python3 -m pip install --upgrade pip
pip install setuptools --upgrade
pip uninstall obr -y
cd /root/OBR
git pull origin dev
pip install -e .
- name: Generate test cases
working-directory: /github/home/
run: |
export PATH=$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/bin:$PATH
export LD_LIBRARY_PATH=$FOAM_USER_LIBBIN:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/openmpi-system:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/dummy/:$LD_LIBRARY_PATH
export OBR_RUN_CMD="mpirun --bind-to core --map-by core -np {np} {solver} -parallel -case {path}/case > {path}/case/{solver}_{timestamp}.log 2>&1"
source /root/OpenFOAM/${{inputs.path}}/etc/bashrc
mkdir -p ${{matrix.Case}} && cd ${{matrix.Case}}
export CYCLIC_CASE=${{inputs.cyclic_case}}
obr init --config /__w/OGL/OGL/test/${{matrix.Case}}.yaml
obr run -o generate
cat workspace/*/case/*log
run:
runs-on: ubuntu-latest
container: greole/ofbase
needs: [setup_integration_matrix, setup]
name: run-${{matrix.Case}}-${{inputs.version}}
strategy:
fail-fast: false
matrix:
Case: ${{fromJson(needs.setup_integration_matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- name: Source OF enviroment
run: |
mkdir -p $FOAM_INST_DIR
echo "FOAM_ETC=$FOAM_INST_DIR/${{inputs.path}}/etc" >> $GITHUB_ENV
echo "WM_PROJECT_DIR=$FOAM_INST_DIR/${{inputs.path}}" >> $GITHUB_ENV
echo "FOAM_USER_PATH=$FOAM_INST_DIR/root-${{inputs.version}}" >> $GITHUB_ENV
echo "FOAM_TUTORIALS=$FOAM_INST_DIR/${{inputs.path}}/tutorials" >> $GITHUB_ENV
echo "FOAM_USER_LIBBIN=$FOAM_INST_DIR/root-${{inputs.version}}/platforms/linux64GccDPInt32Opt/lib" >> $GITHUB_ENV
echo "FOAM_SRC=$FOAM_INST_DIR/${{inputs.path}}/src" >> $GITHUB_ENV
echo "Ginkgo_DIR=${{env.FOAM_INST_DIR}}/root-${{inputs.version}}/platforms/linux64GccDPInt32Opt/lib/cmake/Ginkgo" >> $GITHUB_ENV
echo "GINKGO_EXECUTOR=reference" >> $GITHUB_ENV
echo "CYCLIC_CASE=${{inputs.cyclic_case}}" >> $GITHUB_ENV
echo "OMPI_MCA_btl_vader_single_copy_mechanism=none" >> $GITHUB_ENV
- name: Get Ginkgo checkout version
shell: bash
run: |
grep -A1 "set(GINKGO_CHECKOUT_VERSION" CMakeLists.txt|tail -n1|grep -o "[0-9a-z\-]*" > GINKGO_CHECKOUT_VERSION
export GINKGO_CHECKOUT_VERSION=$(cat GINKGO_CHECKOUT_VERSION)
echo "GINKGO_CHECKOUT_VERSION=$GINKGO_CHECKOUT_VERSION" >> $GITHUB_ENV
echo "Ginkgo_DIR=${{inputs.foam_user_libbin}}/cmake/Ginkgo" >> $GITHUB_ENV
- name: Update OBR
working-directory: /github/home/
run: |
python3 -m pip install --upgrade pip
pip install setuptools --upgrade
pip uninstall obr -y
cd /root/OBR
git pull origin dev
pip install -e .
- name: Cache build
uses: actions/cache@v3
with:
key: build-${{ inputs.path }}-${{env.GINKGO_CHECKOUT_VERSION}}
path: |
${{github.workspace}}/build
- name: Cache FOAM_USER_LIBBIN
uses: actions/cache@v3
with:
key: FOAM_USER_LIBBIN-${{ inputs.version }}-${{ github.sha }}
path: |
${{inputs.foam_user_libbin}}
- name: Cache Workspace
uses: actions/cache@v3
with:
key: ws-${{inputs.version}}-${{matrix.Case}}-${{ github.sha }}
path: /home/runner/work/_temp/_github_home/${{matrix.Case}}
- name: Execute test cases
working-directory: /github/home/${{matrix.Case}}
timeout-minutes: 10
run: |
export PATH=$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/bin:$PATH
export LD_LIBRARY_PATH=$FOAM_USER_LIBBIN:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/openmpi-system:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/dummy/:$LD_LIBRARY_PATH
export OBR_RUN_CMD="mpirun --bind-to core --map-by core -np {np} {solver} -parallel -case {path}/case > {path}/case/{solver}_{timestamp}.log 2>&1"
source /root/OpenFOAM/${{inputs.path}}/etc/bashrc
ls
obr run -o runParallelSolver
- name: Validation of exported mtx files
working-directory: /github/home/${{matrix.Case}}
run: |
python3 /__w/OGL/OGL/test/data_validation.py workspace
ls -la workspace/*/case/
ls -la workspace/*/case/processor0/*
- name: Validate unpreconditioned state
working-directory: /github/home/${{matrix.Case}}
run: |
obr status
obr query \
-q global -q continuityErrors -q CourantNumber \
--filter preconditioner==none \
--filter matrixFormat==Coo \
--filter global==completed \
--validate_against=/__w/OGL/OGL/test/${{matrix.Case}}_validation.json
- name: Validate preconditioned state
working-directory: /github/home/${{matrix.Case}}
run: |
obr status
obr query \
-q global -q continuityErrors -q CourantNumber \
--validate_against=/__w/OGL/OGL/test/${{matrix.Case}}_validation.json \
--filter preconditioner!=none \
--filter global==completed
- name: Validate matrix formats
working-directory: /github/home/${{matrix.Case}}
run: |
obr status
obr query \
-q global -q continuityErrors -q CourantNumber \
--validate_against=/__w/OGL/OGL/test/${{matrix.Case}}_validation.json \
--filter matrixFormat!=Coo \
--filter global==completed
- name: Rename log files
if: failure()
working-directory: /github/home/
run: |
find . -name "*:*" -exec rename 's|:|-|g' {} \;
- name: Archive integration artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: ogl_integration_${{ inputs.path }}
path: /github/home