Remove wall elements from 4C #5928
Workflow file for this run
This file contains hidden or 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: buildtest | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gcc13_assertions_build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| 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@v6 | |
| - 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_directory | |
| name: Upload 4C build | |
| with: | |
| directory: ${{ github.workspace }}/build | |
| retention-days: 1 | |
| name: gcc13_assertions_build | |
| - 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 | |
| if: github.ref != 'refs/heads/main' | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| 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@v6 | |
| - 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_directory | |
| with: | |
| name: gcc13_assertions_build | |
| destination: ${{ github.workspace }}/build | |
| - name: Test | |
| run: | | |
| cd $GITHUB_WORKSPACE/build | |
| 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 | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| 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: github.ref != 'refs/heads/main' && (success() || failure()) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github | |
| - uses: ./.github/actions/merge_junit_report_artifacts | |
| with: | |
| junit-report-base-name: gcc13_assertions_test_report | |
| retention-days: 1 | |
| clang18_build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
| defaults: | |
| run: | |
| shell: bash | |
| outputs: | |
| cache-key: ${{ steps.build-4C.outputs.cache-key }} | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| steps: | |
| # Due to a bug in runner action the variables $GITHUB_WORKSPACE and ${{ github.workspace }} are different inside a container. https://github.com/actions/runner/issues/2058 | |
| # The repo gets cloned to `/__w/4C/4C` ($GITHUB_WORKSPACE) while ${{ github.workspace }} points to `/home/runner/work/4C/4C`.` | |
| # Use $GITHUB_WORKSPACE instead of ${{ github.workspace }} | |
| - uses: actions/checkout@v6 | |
| - name: Check docker hash | |
| uses: ./.github/actions/compute-and-check-dependencies-hash | |
| - uses: ./.github/actions/build_4C | |
| id: build-4C | |
| with: | |
| cmake-preset: docker_clang | |
| build-targets: full | |
| build-directory: ${{ github.workspace }}/build | |
| use-ccache: "true" | |
| - uses: ./.github/actions/upload_directory | |
| name: Upload 4C build | |
| with: | |
| directory: ${{ github.workspace }}/build | |
| retention-days: 1 | |
| name: clang18_build | |
| - name: Upload ccache dir as artifact | |
| uses: ./.github/actions/upload_directory | |
| with: | |
| directory: ${{ env.CCACHE_DIR }} | |
| retention-days: 1 | |
| name: clang18_build_ccache | |
| - name: Upload 4C schema | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ github.job }}-schema | |
| path: | | |
| ${{ github.workspace }}/build/4C_schema.json | |
| retention-days: 1 | |
| - name: Upload 4C metadata | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ github.job }}-metadata | |
| path: | | |
| ${{ github.workspace }}/build/4C_metadata.yaml | |
| retention-days: 1 | |
| clang18_test_minimal: | |
| needs: clang18_build | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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_directory | |
| with: | |
| name: clang18_build | |
| destination: ${{ github.workspace }}/build | |
| - name: Test | |
| run: | | |
| cd $GITHUB_WORKSPACE/build | |
| ctest -L minimal -j `nproc` --output-on-failure | |
| clang18_test_install: | |
| needs: clang18_build | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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_directory | |
| with: | |
| name: clang18_build_ccache | |
| destination: ${{ env.CCACHE_DIR }} | |
| - name: Install ccache | |
| run: | | |
| apt update | |
| apt install -y ccache | |
| - uses: ./.github/actions/build_4C | |
| with: | |
| cmake-preset: docker_clang | |
| build-targets: install | |
| build-directory: ${{ github.workspace }}/build | |
| use-ccache: "true" | |
| restore-ccache: "false" # do not restore the ccache from the Github cache | |
| cache-key: ${{needs.clang18_build.outputs.cache-key}} | |
| - name: Test the installation | |
| run: | | |
| cd $GITHUB_WORKSPACE/build/tests/install_test | |
| sh test_install.sh | |
| clang18_verify_schema: | |
| needs: clang18_build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: clang18_build-schema | |
| path: ${{ github.workspace }} | |
| - name: Validate all input files against schema | |
| run: | | |
| cd $GITHUB_WORKSPACE | |
| ${{ github.workspace }}/utilities/set_up_dev_env.sh | |
| source ${{ github.workspace }}/utilities/python-venv/bin/activate | |
| shopt -s globstar nullglob | |
| validate-test-files --schema ${{ github.workspace }}/4C_schema.json **/*.4C.yaml **/*.4C.yml **/*.4C.json | |
| gcc13_no_optional_dependencies_build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| 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@v6 | |
| - name: Check docker hash | |
| uses: ./.github/actions/compute-and-check-dependencies-hash | |
| - uses: ./.github/actions/build_4C | |
| with: | |
| cmake-preset: docker_no_optional_dependencies | |
| build-targets: full | |
| build-directory: ${{ github.workspace }}/build | |
| use-ccache: "true" | |
| - uses: ./.github/actions/upload_directory | |
| name: Upload 4C build | |
| with: | |
| directory: ${{ github.workspace }}/build | |
| retention-days: 1 | |
| name: gcc13_no_optional_dependencies_build | |
| - 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_no_optional_dependencies_test_report.xml | |
| gcc13_no_optional_dependencies_test: | |
| needs: gcc13_no_optional_dependencies_build | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c-dependencies-ubuntu24.04:35e0657d | |
| options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-chunk: ${{fromJson(needs.gcc13_no_optional_dependencies_build.outputs.test-chunks)}} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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_directory | |
| with: | |
| name: gcc13_no_optional_dependencies_build | |
| destination: ${{ github.workspace }}/build | |
| - name: Test | |
| run: | | |
| cd $GITHUB_WORKSPACE/build | |
| ctest -I $TEST_CHUNK -j `nproc` --output-on-failure --output-junit $GITHUB_WORKSPACE/gcc13_no_optional_dependencies_test_report-$TEST_CHUNK.xml | |
| env: | |
| TEST_CHUNK: ${{ matrix.test-chunk }} | |
| - name: Upload test report | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: gcc13_no_optional_dependencies_test_report-${{ matrix.test-chunk }}.xml | |
| path: | | |
| ${{ github.workspace }}/gcc13_no_optional_dependencies_test_report-${{ matrix.test-chunk }}.xml | |
| retention-days: 1 | |
| gcc13_no_optional_dependencies_test_report: | |
| needs: gcc13_no_optional_dependencies_test | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' && (success() || failure()) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github | |
| - uses: ./.github/actions/merge_junit_report_artifacts | |
| with: | |
| junit-report-base-name: gcc13_no_optional_dependencies_test_report | |
| retention-days: 1 | |
| ensure_all_tests_pass: | |
| needs: | |
| - gcc13_assertions_test | |
| - gcc13_assertions_test_report | |
| - gcc13_assertions_build | |
| - clang18_build | |
| - clang18_test_minimal | |
| - clang18_test_install | |
| - clang18_verify_schema | |
| - gcc13_no_optional_dependencies_build | |
| - gcc13_no_optional_dependencies_test | |
| - gcc13_no_optional_dependencies_test_report | |
| runs-on: ubuntu-latest | |
| if: always() && github.ref != 'refs/heads/main' | |
| steps: | |
| - name: Check for successful builds and tests | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |