[CI] Store Nightly Artifacts #3070
Workflow file for this run
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 | ||
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 | ||
shell: bash | ||
run: | | ||
python3 -m pip install parameterized | ||
- 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 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Nightly-Ubuntu | ||
if: ${{ matrix.compiler == clang }} | ||
Check failure on line 107 in .github/workflows/nightly_build.yml GitHub Actions / Nightly BuildInvalid workflow file
|
||
path: ${{ github.workspace }}/bin/${{ env.KRATOS_BUILD_TYPE }} | ||
windows-nightly: | ||
runs-on: windows-2022 | ||
env: | ||
KRATOS_BUILD_TYPE: Custom | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Download boost | ||
run: | | ||
$url = "https://boostorg.jfrog.io/artifactory/main/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 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Nightly-Windows | ||
path: ${{ github.workspace }}/bin/${{ env.KRATOS_BUILD_TYPE }} | ||
centos-nightly: | ||
runs-on: ubuntu-latest | ||
env: | ||
KRATOS_BUILD_TYPE: Custom | ||
container: | ||
image: kratosmultiphysics/kratos-image-ci-centos7:latest | ||
options: --user 1001 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Installing dependencies | ||
shell: bash | ||
run: | | ||
python3.8 -m pip install parameterized | ||
- 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 |