Skip to content

Allow selecting the zone used by the python wrapper (for multizone drivers) #6753

Allow selecting the zone used by the python wrapper (for multizone drivers)

Allow selecting the zone used by the python wrapper (for multizone drivers) #6753

Workflow file for this run

name: Regression and Unit Testing
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'
workflow_call:
inputs:
runner:
description: 'The github runner to use'
default: 'ubuntu-latest'
required: false
type: string
jobs:
build:
name: Build SU2
strategy:
fail-fast: false
matrix:
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
include:
- config_set: BaseMPI
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2 --werror'
- config_set: ReverseMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseNoMPI
flags: '-Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardNoMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseOMP
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ReverseOMP
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ForwardOMP
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v3
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/bin
- name: Upload Binaries
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
build_tsan:
name: Build SU2 (tsan)
if: inputs.runner != 'ARM64'
strategy:
fail-fast: false
matrix:
config_set: [BaseOMP-tsan, ReverseOMP-tsan] #ForwardOMP-tsan
include:
- config_set: BaseOMP-tsan
flags: '--buildtype=debugoptimized -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
- config_set: ReverseOMP-tsan
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
#- config_set: ForwardOMP-tsan
# flags: '--buildtype=debug -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v3
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/bin
- name: Upload Binaries
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
regression_tests:
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Regression Tests
needs: build
strategy:
fail-fast: false
matrix:
testscript: ['vandv.py', 'tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py', 'hybrid_regression_AD.py']
include:
- testscript: 'vandv.py'
tag: MPI
- testscript: 'tutorials.py'
tag: MPI
- testscript: 'parallel_regression.py'
tag: MPI
- testscript: 'parallel_regression_AD.py'
tag: MPI
- testscript: 'serial_regression.py'
tag: NoMPI
- testscript: 'serial_regression_AD.py'
tag: NoMPI
- testscript: 'hybrid_regression.py'
tag: OMP
- testscript: 'hybrid_regression_AD.py'
tag: OMP
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v3
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}${{matrix.tag}}"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/bin/* $BIN_FOLDER;
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
thread_sanitizer_tests:
if: inputs.runner != 'ARM64'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Thread Sanitizer Tests
needs: build_tsan
strategy:
fail-fast: false
matrix:
testscript: ['hybrid_regression.py', 'hybrid_regression_AD.py']
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v3
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}OMP-tsan"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/bin/* $BIN_FOLDER;
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
unit_tests:
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Unit Tests
needs: build
strategy:
fail-fast: false
matrix:
testdriver: ['test_driver', 'test_driver_AD', 'test_driver_DD']
include:
- testdriver: 'test_driver'
tag: MPI
- testdriver: 'test_driver_AD'
tag: MPI
- testdriver: 'test_driver_DD'
tag: MPI
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download Base
uses: actions/download-artifact@v3
with:
name: ${{format('Base{0}', matrix.tag)}}
path: ${{format('Base{0}', matrix.tag)}}
- name: Download Reverse
uses: actions/download-artifact@v3
with:
name: ${{format('Reverse{0}', matrix.tag)}}
path: ${{format('Reverse{0}', matrix.tag)}}
- name: Download Forward
uses: actions/download-artifact@v3
with:
name: ${{format('Forward{0}', matrix.tag)}}
path: ${{format('Forward{0}', matrix.tag)}}
- name: Uncompress and Move Binaries
run: |
ls -lah
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -laH $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}${{matrix.tag}}"
if [ -d $TYPE_FOLDER ]; then
echo "Processing '$TYPE_FOLDER' ..."
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -laH install/bin/
cp -r install/bin/* $BIN_FOLDER;
popd;
else
echo "$TYPE_FOLDER does not exist!"
fi
done
find $BIN_FOLDER -type f -exec chmod a+x '{}' \;
ls -lahR $BIN_FOLDER
echo "cloning branch"
branch="${{github.ref}}"
name="SU2"
SRC_FOLDER="$PWD/src"
mkdir -p $SRC_FOLDER
cd $SRC_FOLDER
git clone --recursive --depth=1 --shallow-submodules https://github.com/su2code/SU2 $name
cd $name
git config --add remote.origin.fetch '+refs/pull/*/merge:refs/remotes/origin/refs/pull/*/merge'
git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/refs/heads/*'
git fetch origin --depth=1 $branch:$branch
git checkout $branch
git submodule update
echo $PWD
ls -lahR
cd ..
echo "done cloning"
echo $PWD
ls -lahR
- name: Run Unit Tests
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: install/bin/${{matrix.testdriver}}
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}