Start unifying ElasticSolver() and StressSolver() by unifying the nod… #2262
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: ubuntu-parallel | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.nix' | |
| - 'flake.lock' | |
| pull_request: | |
| paths-ignore: | |
| - '**.nix' | |
| - 'flake.lock' | |
| workflow_dispatch: | |
| jobs: | |
| ubuntu: | |
| if: ${{ github.repository == 'ElmerCSC/elmerfem' }} # only run job for main repository (forks usually do not have self-hosted runners) | |
| runs-on: self-hosted | |
| name: ubuntu-parallel (${{ matrix.compiler }}) | |
| strategy: | |
| # Allow other runners in the matrix to continue if some fail | |
| fail-fast: false | |
| matrix: | |
| compiler: [gcc] | |
| include: | |
| - compiler: gcc | |
| compiler-pkgs: "g++ gcc" | |
| cc: "gcc" | |
| cxx: "g++" | |
| openmp-cmake-flags: "-WITH_OpenMP=ON" | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| steps: | |
| - name: get CPU information | |
| run: lscpu | |
| - name: checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: false | |
| fetch-depth: 0 | |
| - name: init and update Zoltan submodule | |
| run: | | |
| git submodule init | |
| # Self-hosted runners keep the workspace between runs. If a previous | |
| # run left a shallow Zoltan clone at an old commit, unshallow it before | |
| # updating to the new pointer — otherwise git refuses to fetch a commit | |
| # not reachable from the shallow root ("refusing to merge unrelated | |
| # histories"). The command is a no-op on a fresh workspace. | |
| git -C contrib/Zoltan_v3.83 fetch --unshallow 2>/dev/null || true | |
| git submodule update | |
| - name: install dependencies | |
| run: | | |
| sudo apt -qq update | |
| sudo apt install -y ${{ matrix.compiler-pkgs }} cmake gfortran \ | |
| libhypre-dev libopenblas-dev libopenmpi-dev libmumps-dev \ | |
| libparmetis-dev libqwt-qt5-dev qtscript5-dev libqt5svg5-dev | |
| - name: configure | |
| run: | | |
| mkdir ${GITHUB_WORKSPACE}/build | |
| cd ${GITHUB_WORKSPACE}/build | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE="Release" \ | |
| -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \ | |
| -DBLA_VENDOR="OpenBLAS" \ | |
| ${{ matrix.openmp-cmake-flags }} \ | |
| -DWITH_LUA=ON \ | |
| -DWITH_Zoltan=ON \ | |
| -DWITH_Mumps=ON \ | |
| -DWITH_Hypre=ON \ | |
| -DHypre_INCLUDE_DIR="/usr/include/hypre" \ | |
| -DWITH_ELMERGUI=ON \ | |
| -DWITH_PARAVIEW=ON \ | |
| -DWITH_ElmerIce=ON \ | |
| -DCREATE_PKGCONFIG_FILE=ON \ | |
| -DWITH_MPI=ON \ | |
| -DMPI_TEST_MAXPROC=$(nproc) \ | |
| -DMPIEXEC_PREFLAGS="--allow-run-as-root" \ | |
| .. | |
| - name: build | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/build | |
| cmake --build . -j$(nproc) | |
| - name: install | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/build | |
| cmake --install . | |
| - name: check | |
| id: run-ctest | |
| timeout-minutes: 150 | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/build | |
| ctest . -j$(nproc) -L "parallel|fast" | |
| - name: re-run tests | |
| if: always() && (steps.run-ctest.outcome == 'failure') | |
| timeout-minutes: 60 | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/build | |
| # get names of failed tests and strip potential "_np*" suffix | |
| failed_tests=($(ctest . -N --rerun-failed | grep -E "Test\s+#.*" | awk '{print $3}' | sed -e 's/_np[0-9]*$//g')) | |
| # remove duplicate test names | |
| unique_failed_tests=($(echo "${failed_tests[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')) | |
| for test in "${unique_failed_tests[@]}"; do | |
| # check if test is from fem or ElmerIce | |
| if [ -d fem/tests/${test} ]; then | |
| test_root=fem/tests | |
| else | |
| test_root=elmerice/Tests | |
| fi | |
| echo "::group::Content of ${test_root}/${test}" | |
| echo ---- Files ---- | |
| ls -Rl ${test_root}/${test} | |
| err_logs=($(ls ${test_root}/${test}/test-stderr*.log 2>/dev/null)) | |
| for err_log in "${err_logs[@]}"; do | |
| echo ---- Content of ${err_log} ---- | |
| cat ${err_log} | |
| done | |
| out_logs=($(ls ${test_root}/${test}/test-stdout*.log 2>/dev/null)) | |
| for out_log in "${out_logs[@]}"; do | |
| echo ---- Content of ${out_log} ---- | |
| cat ${out_log} | |
| done | |
| echo "::endgroup::" | |
| done | |
| echo "::group::Re-run failing tests" | |
| ctest --rerun-failed --output-on-failure || true | |
| echo "::endgroup::" | |
| echo "::group::Log from these tests" | |
| [ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log | |
| echo "::endgroup::" |