[CI] Prepare for selective app-complication #3274
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Build | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/nightly_build.yml' | |
- '.github/workflows/configure.sh' | |
- '.github/workflows/configure.cmd' | |
- '.github/workflows/centos_configure.sh' | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
# for cancelling redundant runs | |
concurrency: | |
group: nightly-build-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
ubuntu-nightly: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [gcc, clang] | |
env: | |
KRATOS_BUILD_TYPE: Release | |
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_linux.json" | |
KRATOS_CI_CHANGED_FILES: "ALL" | |
OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0) | |
OMPI_MCA_btl_vader_single_copy_mechanism: none # suppressing some annoying OpenMPI messages | |
container: | |
image: kratosmultiphysics/kratos-image-ci-ubuntu-22-04:latest | |
options: --user 1001 | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Installing dependencies | |
# => must be added to the docker container to avoid reinstalling it in every CI run | |
- name: CI configuration | |
shell: bash | |
run: python3 kratos/python_scripts/testing/ci_utilities.py | |
- name: Build | |
shell: bash | |
run: | | |
if [ ${{ matrix.compiler }} = gcc ]; then | |
export CC=/usr/bin/gcc-12 | |
export CXX=/usr/bin/g++-12 | |
export KRATOS_CMAKE_OPTIONS_FLAGS="-DUSE_EIGEN_MKL=ON -DUSE_EIGEN_FEAST=ON -DTRILINOS_EXCLUDE_AMESOS2_SOLVER=OFF -DMMG_ROOT=/external_libraries/mmg/mmg_5_5_1/ -DPMMG_ROOT=/external_libraries/ParMmg_5ffc6ad -DINCLUDE_PMMG=ON" | |
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers" | |
elif [ ${{ matrix.compiler }} = clang ]; then | |
export CC=/usr/bin/clang-14 | |
export CXX=/usr/bin/clang++-14 | |
export KRATOS_CMAKE_OPTIONS_FLAGS="-DTRILINOS_EXCLUDE_AMESOS2_SOLVER=OFF -DMMG_ROOT=/external_libraries/mmg/mmg_5_5_1/" | |
else | |
echo 'Unsupported compiler: ${{ matrix.compiler }}' | |
exit 1 | |
fi | |
source /opt/intel/oneapi/setvars.sh | |
cp .github/workflows/configure.sh configure.sh # maybe use different configure script in the future | |
bash configure.sh | |
- name: Running tests | |
shell: bash | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE} | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs | |
python3 kratos/python_scripts/testing/run_tests.py -l nightly -c python3 | |
- name: Running Python MPI tests (2 Cores) | |
shell: bash | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
export OMP_NUM_THREADS=1 | |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE} | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs | |
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 2 | |
- name: Running Python MPI tests (3 Cores) | |
shell: bash | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
export OMP_NUM_THREADS=1 | |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE} | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs | |
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 3 | |
- name: Running Python MPI tests (4 Cores) | |
shell: bash | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
export OMP_NUM_THREADS=1 | |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE} | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs | |
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 4 | |
windows-nightly: | |
runs-on: windows-2022 | |
env: | |
KRATOS_BUILD_TYPE: Custom | |
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_windows.json" | |
KRATOS_CI_CHANGED_FILES: "ALL" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: CI configuration | |
shell: bash | |
run: python3 kratos/python_scripts/testing/ci_utilities.py | |
- name: Download boost | |
run: | | |
$url = "https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz" | |
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz") | |
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null | |
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null | |
- name: Installing dependencies | |
shell: cmd | |
run: | | |
pip install numpy | |
pip install h5py | |
pip install sympy | |
pip install scipy | |
pip install parameterized | |
- name: Build | |
shell: cmd | |
run: | | |
copy .\.github\workflows\configure.cmd | |
configure.cmd | |
- name: Running nightly tests | |
shell: cmd | |
run: | | |
set PYTHONPATH=%PYTHONPATH%;%GITHUB_WORKSPACE%/bin/%KRATOS_BUILD_TYPE% | |
set PATH=%PATH%;%GITHUB_WORKSPACE%/bin/%KRATOS_BUILD_TYPE%/libs | |
python kratos/python_scripts/testing/run_tests.py -l nightly -c python | |
centos-nightly: | |
runs-on: ubuntu-latest | |
env: | |
KRATOS_BUILD_TYPE: Custom | |
KRATOS_CI_APPLICATIONS: ".github/workflows/ci_apps_centos.json" | |
KRATOS_CI_CHANGED_FILES: "ALL" | |
container: | |
image: kratosmultiphysics/kratos-image-ci-centos7:latest | |
options: --user 1001 | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Installing dependencies | |
# => must be added to the docker container to avoid reinstalling it in every CI run | |
- name: CI configuration | |
shell: bash | |
run: python3 kratos/python_scripts/testing/ci_utilities.py | |
- name: Build | |
run: | | |
cp .github/workflows/centos_configure.sh centos_configure.sh | |
bash centos_configure.sh | |
- name: Running nightly tests | |
run: | | |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs | |
python3.8 kratos/python_scripts/testing/run_tests.py -l nightly -c python3.8 |