nightly_tests #98
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_tests | |
on: | |
schedule: | |
- cron: '0 22 * * *' | |
jobs: | |
gcc13_assertions_build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
defaults: | |
run: | |
shell: bash | |
outputs: | |
test-chunks: ${{ steps.set-matrix.outputs.chunk-array }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- uses: ./.github/actions/build_4C | |
with: | |
cmake-preset: docker_assertions | |
build-targets: full | |
build-directory: ${{ github.workspace }}/build | |
use-ccache: "true" | |
- uses: ./.github/actions/upload_4C_build | |
with: | |
build-directory: ${{ github.workspace }}/build | |
retention-days: 1 | |
- uses: ./.github/actions/chunk_test_suite | |
id: set-matrix | |
with: | |
build-directory: ${{ github.workspace }}/build | |
source-directory: ${{ github.workspace }} | |
number-of-chunks: 15 | |
junit-report-artifact-name: gcc13_assertions_test_report.xml | |
gcc13_assertions_test: | |
needs: gcc13_assertions_build | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
strategy: | |
fail-fast: false | |
matrix: | |
test-chunk: ${{fromJson(needs.gcc13_assertions_build.outputs.test-chunks)}} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- name: Setup developer environment for testing | |
run: | | |
cd $GITHUB_WORKSPACE | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
- uses: ./.github/actions/download_4C_build | |
with: | |
build-job: gcc13_assertions_build | |
destination: ${{ github.workspace }}/build | |
- name: Test | |
run: | | |
cd $GITHUB_WORKSPACE/build | |
time ctest -I $TEST_CHUNK -j `nproc` --output-on-failure --output-junit $GITHUB_WORKSPACE/gcc13_assertions_test_report-$TEST_CHUNK.xml | |
env: | |
TEST_CHUNK: ${{ matrix.test-chunk }} | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: gcc13_assertions_test_report-${{ matrix.test-chunk }}.xml | |
path: | | |
${{ github.workspace }}/gcc13_assertions_test_report-${{ matrix.test-chunk }}.xml | |
retention-days: 1 | |
gcc13_assertions_test_report: | |
needs: gcc13_assertions_test | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- uses: ./.github/actions/merge_junit_report_artifacts | |
with: | |
junit-report-base-name: gcc13_assertions_test_report | |
retention-days: 2 | |
clang18_build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
defaults: | |
run: | |
shell: bash | |
outputs: | |
test-chunks: ${{ steps.set-matrix.outputs.chunk-array }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- uses: ./.github/actions/build_4C | |
with: | |
cmake-preset: docker_clang | |
build-targets: full | |
build-directory: ${{ github.workspace }}/build | |
use-ccache: "false" | |
additional-cmake-flags: "-DFOUR_C_CXX_FLAGS=-ftime-trace" | |
- uses: ./.github/actions/upload_4C_build | |
with: | |
build-directory: ${{ github.workspace }}/build | |
retention-days: 1 | |
- uses: ./.github/actions/chunk_test_suite | |
id: set-matrix | |
with: | |
build-directory: ${{ github.workspace }}/build | |
source-directory: ${{ github.workspace }} | |
number-of-chunks: 15 | |
junit-report-artifact-name: clang18_test_report.xml | |
clang18_analyze_compile_time: | |
needs: clang18_build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: aras-p/ClangBuildAnalyzer | |
ref: bae0cb488cce944bfc3da9850a69ad621701ebef # version 1.6.0 | |
path: ClangBuildAnalyzer | |
- name: Build ClangBuildAnalyzer | |
run: | | |
cd $GITHUB_WORKSPACE/ClangBuildAnalyzer | |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- uses: ./.github/actions/download_4C_build | |
with: | |
build-job: clang18_build | |
destination: ${{ github.workspace }}/build | |
- name: Analyze compile time | |
run: | | |
$GITHUB_WORKSPACE/ClangBuildAnalyzer/build/ClangBuildAnalyzer --all $GITHUB_WORKSPACE/build time_trace.bin | |
$GITHUB_WORKSPACE/ClangBuildAnalyzer/build/ClangBuildAnalyzer --analyze time_trace.bin > $GITHUB_WORKSPACE/clang18_compile_time_report.txt | |
cat $GITHUB_WORKSPACE/clang18_compile_time_report.txt | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: clang18_compile_time_report.txt | |
path: | | |
${{ github.workspace }}/clang18_compile_time_report.txt | |
retention-days: 90 | |
clang18_test: | |
needs: clang18_build | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
strategy: | |
fail-fast: false | |
matrix: | |
test-chunk: ${{fromJson(needs.clang18_build.outputs.test-chunks)}} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- name: Setup developer environment for testing | |
run: | | |
cd $GITHUB_WORKSPACE | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
- uses: ./.github/actions/download_4C_build | |
with: | |
build-job: clang18_build | |
destination: ${{ github.workspace }}/build | |
- name: Test | |
run: | | |
cd $GITHUB_WORKSPACE/build | |
time ctest -I $TEST_CHUNK -j `nproc` --output-on-failure --output-junit $GITHUB_WORKSPACE/clang18_test_report-$TEST_CHUNK.xml | |
env: | |
TEST_CHUNK: ${{ matrix.test-chunk }} | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: clang18_test_report-${{ matrix.test-chunk }}.xml | |
path: | | |
${{ github.workspace }}/clang18_test_report-${{ matrix.test-chunk }}.xml | |
retention-days: 1 | |
clang18_test_report: | |
needs: clang18_test | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- uses: ./.github/actions/merge_junit_report_artifacts | |
with: | |
junit-report-base-name: clang18_test_report | |
retention-days: 2 | |
gcc13_asan_build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
defaults: | |
run: | |
shell: bash | |
outputs: | |
test-chunks: ${{ steps.set-matrix.outputs.chunk-array }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- uses: ./.github/actions/build_4C | |
with: | |
cmake-preset: docker_asan | |
build-targets: full | |
build-directory: ${{ github.workspace }}/build | |
use-ccache: "false" # no ccache since asan is only tested once per day | |
- uses: ./.github/actions/upload_4C_build | |
with: | |
build-directory: ${{ github.workspace }}/build | |
retention-days: 1 | |
- uses: ./.github/actions/chunk_test_suite | |
id: set-matrix | |
with: | |
build-directory: ${{ github.workspace }}/build | |
source-directory: ${{ github.workspace }} | |
number-of-chunks: 15 | |
junit-report-artifact-name: gcc13_asan_test_report.xml | |
gcc13_asan_test: | |
needs: gcc13_asan_build | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:28cfb9d0 | |
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
strategy: | |
fail-fast: false | |
matrix: | |
test-chunk: ${{fromJson(needs.gcc13_asan_build.outputs.test-chunks)}} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check docker hash | |
uses: ./.github/actions/compute-and-check-dependencies-hash | |
- name: Setup developer environment for testing | |
run: | | |
cd $GITHUB_WORKSPACE | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
- uses: ./.github/actions/download_4C_build | |
with: | |
build-job: gcc13_asan_build | |
destination: ${{ github.workspace }}/build | |
- name: Test | |
run: | | |
cd $GITHUB_WORKSPACE/build | |
time ctest -I $TEST_CHUNK -j `nproc` --output-on-failure --output-junit $GITHUB_WORKSPACE/gcc13_asan_test_report-$TEST_CHUNK.xml | |
env: | |
TEST_CHUNK: ${{ matrix.test-chunk }} | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: gcc13_asan_test_report-${{ matrix.test-chunk }}.xml | |
path: | | |
${{ github.workspace }}/gcc13_asan_test_report-${{ matrix.test-chunk }}.xml | |
retention-days: 1 | |
gcc13_asan_test_report: | |
needs: gcc13_asan_test | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- uses: ./.github/actions/merge_junit_report_artifacts | |
with: | |
junit-report-base-name: gcc13_asan_test_report | |
retention-days: 2 |