From 91906049ad95fc10e0c7097a28ea76edf890a08f Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 15:41:50 +0200 Subject: [PATCH 01/24] feat: adds a workflow for testing advection example --- .github/workflows/test_t8code_advection.yml | 76 +++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/test_t8code_advection.yml diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml new file mode 100644 index 0000000000..9c94ea4a6b --- /dev/null +++ b/.github/workflows/test_t8code_advection.yml @@ -0,0 +1,76 @@ +name: test t8code examples + + +# This file is part of t8code. +# t8code is a C library to manage a collection (a forest) of multiple +# connected adaptive space-trees of general element types in parallel. +# +# Copyright (C) 2026 the developers +# +# t8code is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# t8code is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with t8code; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +name: Test t8code Compilation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + # Test various compiler flags and debug levels + flags: + - "-O2" + - "-O3 -Wall -Wextra" + - "-DT8_ENABLE_DEBUG=1" + - "-O2 -DT8_ENABLE_DEBUG=0" + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install System Dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + build-essential \ + gfortran \ + libopenmpi-dev \ + openmpi-bin \ + clang + + - name: Configure CMake + run: | + if [ "${{ matrix.compiler }}" = "gcc" ]; then + export CC=gcc CXX=g++ + else + export CC=clang CXX=clang++ + fi + + cmake -B build -S . \ + -DCMAKE_BUILD_TYPE=Release \ + -DEXTRA_FLAGS="${{ matrix.flags }}" + + - name: Compile Executable + run: | + cmake --build build --target t8_advection -j $(nproc) \ No newline at end of file From 38b72b7effbc6f352c138c4ea75513262ce1c310 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 15:45:32 +0200 Subject: [PATCH 02/24] fix: make name more specific --- .github/workflows/test_t8code_advection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 9c94ea4a6b..5b9be1316e 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -1,4 +1,4 @@ -name: test t8code examples +name: test t8code advection examples # This file is part of t8code. From cdfa61216cc68214cda3ab1fb682a7d4657e79ab Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 15:46:51 +0200 Subject: [PATCH 03/24] fix: remove second name --- .github/workflows/test_t8code_advection.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 5b9be1316e..6bd4a45581 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -20,7 +20,6 @@ name: test t8code advection examples # You should have received a copy of the GNU General Public License # along with t8code; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -name: Test t8code Compilation on: push: From a98285c1324d48c33dbe45d9a9bbfbf498b1335f Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:00:46 +0200 Subject: [PATCH 04/24] fix: rewrite configure cmake --- .github/workflows/test_t8code_advection.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 6bd4a45581..5c5347b37a 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -60,16 +60,18 @@ jobs: - name: Configure CMake run: | + # Set compiler variables based on matrix selection if [ "${{ matrix.compiler }}" = "gcc" ]; then - export CC=gcc CXX=g++ + C_COMP="gcc" + CXX_COMP="g++" else - export CC=clang CXX=clang++ + C_COMP="clang" + CXX_COMP="clang++" fi cmake -B build -S . \ + -DCMAKE_C_COMPILER=$C_COMP \ + -DCMAKE_CXX_COMPILER=$CXX_COMP \ -DCMAKE_BUILD_TYPE=Release \ - -DEXTRA_FLAGS="${{ matrix.flags }}" - - - name: Compile Executable - run: | - cmake --build build --target t8_advection -j $(nproc) \ No newline at end of file + -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ + -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") \ No newline at end of file From a42b493b878472a8421a799f15ca88da83141b57 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:06:13 +0200 Subject: [PATCH 05/24] fix: adds back the executable --- .github/workflows/test_t8code_advection.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 5c5347b37a..c6ddfaa4ce 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -74,4 +74,9 @@ jobs: -DCMAKE_CXX_COMPILER=$CXX_COMP \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ - -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") \ No newline at end of file + -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") + + - name: Compile Executable + run: | + NPROC=$(nproc) + cmake --build build --target t8_advection -j $NPROC \ No newline at end of file From 57285008a86be8b6447c7210f00f35f02a386fe3 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:10:41 +0200 Subject: [PATCH 06/24] fix: removes nproc and exchanges it with parallel --- .github/workflows/test_t8code_advection.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index c6ddfaa4ce..caed22da88 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -76,7 +76,5 @@ jobs: -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") - - name: Compile Executable - run: | - NPROC=$(nproc) - cmake --build build --target t8_advection -j $NPROC \ No newline at end of file + - name: Compile Executable + run: cmake --build build --target t8_advection --parallel \ No newline at end of file From 98cc07dbc09fdef2d17cd0148cf988ac62693cbf Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:14:47 +0200 Subject: [PATCH 07/24] lint: adds 1 space --- .github/workflows/test_t8code_advection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index caed22da88..2287476ce4 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -76,5 +76,5 @@ jobs: -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") - - name: Compile Executable + - name: Compile Executable run: cmake --build build --target t8_advection --parallel \ No newline at end of file From 8435ca3533291b96d4e7da1a30fb51ee85963d80 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:17:49 +0200 Subject: [PATCH 08/24] fix: removes trailing ) --- .github/workflows/test_t8code_advection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 2287476ce4..bba4fc3406 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -74,7 +74,7 @@ jobs: -DCMAKE_CXX_COMPILER=$CXX_COMP \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ - -DCMAKE_CXX_FLAGS="${{ matrix.flags }}") + -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" - name: Compile Executable run: cmake --build build --target t8_advection --parallel \ No newline at end of file From cd66ae9bcd3affccc3b8c5e623ed77b355b00642 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:20:56 +0200 Subject: [PATCH 09/24] fix: set a fetch depth --- .github/workflows/test_t8code_advection.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index bba4fc3406..29e1004656 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -46,6 +46,8 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install System Dependencies run: | From 9bf377f9bbf10ba16490331bb95bd8004554c003 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Fri, 21 Aug 2026 16:40:50 +0200 Subject: [PATCH 10/24] chore: replace gcc with mpi --- .github/workflows/test_t8code_advection.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 29e1004656..d2c939e754 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -64,8 +64,8 @@ jobs: run: | # Set compiler variables based on matrix selection if [ "${{ matrix.compiler }}" = "gcc" ]; then - C_COMP="gcc" - CXX_COMP="g++" + C_COMP="mpicc" + CXX_COMP="mpicxx" else C_COMP="clang" CXX_COMP="clang++" From a91514b5ba8642008b44f2efa90e4da05fa840c4 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 12:32:49 +0200 Subject: [PATCH 11/24] fix: improves the test and uses t8code docker container --- .github/workflows/test_t8code_advection.yml | 163 ++++++++++++++------ 1 file changed, 119 insertions(+), 44 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index d2c939e754..310e63267c 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -21,62 +21,137 @@ name: test t8code advection examples # along with t8code; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +env: + DEBUG_CONFIG: "-O1" + on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - workflow_dispatch: + workflow_call: + inputs: + MAKEFLAGS: + required: true + type: string + description: 'Make flags to use for compilation (like -j4)' + MPI: + required: true + type: string + description: 'Use MPI for compilation (ON/OFF)' + BUILD_TYPE: + required: true + type: string + description: 'Build type (Release/Debug)' + TEST_LEVEL: + required: true + type: string + description: 'Test level used for configuring' + default: 'T8_TEST_LEVEL_FULL' jobs: - build: + fine_grained_trigger: + runs-on: ubuntu-latest + outputs: + run_ci: ${{ steps.set_run_ci.outputs.RUN_CI }} + steps: + - uses: actions/checkout@v4 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + - name: set the run_ci variable for the testsuite + id: set_run_ci + run: | + if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 + elif [[ "${{ github.event_name }}" == "merge_group" ]]; then + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 + fi + latest_commit_message=$(git log -1 --pretty=%B) + if [[ "${{ github.event_name }}" != "schedule" ]]; then + if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run ci]"* ]]; then + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 + elif [[ "${{ github.event.pull_request.ready_for_review }}" == "true" ]]; then + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 + else + echo "RUN_CI=false" >> $GITHUB_OUTPUT + exit 0 + fi + else + echo "RUN_CI=false" >> $GITHUB_OUTPUT + exit 0 + fi + + preparation: + needs: [fine_grained_trigger] + secrets: inherit + if: needs.fine_grained_trigger.outputs.run_ci == 'true' + uses: ./.github/workflows/test_preparation.yml + strategy: + fail-fast: false + matrix: + MPI: [OFF, ON] + include: + - MAKEFLAGS: -j4 + with: + MAKEFLAGS: ${{ matrix.MAKEFLAGS }} + IGNORE_CACHE: false + CACHE_COUNTER: 9 + MPI: ${{ matrix.MPI }} + + t8code_cmake_tests: + needs: preparation + timeout-minutes: 25 runs-on: ubuntu-latest + container: dlramr/t8code-dependencies:t8-dependencies-ubuntu-gcc + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: SC_P4EST_MPI_${{ inputs.MPI }} + - name: untar artifact + run: tar -xf artifact.tar && rm artifact.tar + - name: disable ownership checks + run: git config --global --add safe.directory '*' + - name: Get input vars + run: | + export MAKEFLAGS="${{ inputs.MAKEFLAGS }}" + export MPI="${{ inputs.MPI }}" + export BUILD_TYPE="${{ inputs.BUILD_TYPE }}" + export SC_PATH=$PWD/sc/build/$BUILD_TYPE + export P4EST_PATH=$PWD/p4est/build/$BUILD_TYPE + echo MAKEFLAGS="$MAKEFLAGS" >> $GITHUB_ENV + echo MPI="$MPI" >> $GITHUB_ENV + echo BUILD_TYPE="$BUILD_TYPE" >> $GITHUB_ENV + echo SC_PATH="$SC_PATH" >> $GITHUB_ENV + echo P4EST_PATH="$P4EST_PATH" >> $GITHUB_ENV + build_advection: + needs: preparation + runs-on: ubuntu-latest + container: dlramr/t8code-dependencies:t8-dependencies-ubuntu-gcc strategy: fail-fast: false matrix: - compiler: [gcc, clang] - # Test various compiler flags and debug levels + compiler: [gcc] flags: - "-O2" - "-O3 -Wall -Wextra" - "-DT8_ENABLE_DEBUG=1" - "-O2 -DT8_ENABLE_DEBUG=0" - steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install System Dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - cmake \ - build-essential \ - gfortran \ - libopenmpi-dev \ - openmpi-bin \ - clang - - - name: Configure CMake - run: | - # Set compiler variables based on matrix selection - if [ "${{ matrix.compiler }}" = "gcc" ]; then - C_COMP="mpicc" - CXX_COMP="mpicxx" - else - C_COMP="clang" - CXX_COMP="clang++" - fi - - cmake -B build -S . \ - -DCMAKE_C_COMPILER=$C_COMP \ - -DCMAKE_CXX_COMPILER=$CXX_COMP \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ - -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" + - name: Configure CMake + run: | + cmake -B build -S . \ + -DCMAKE_C_COMPILER=mpicc \ + -DCMAKE_CXX_COMPILER=mpiccxx \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ + -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" - - name: Compile Executable - run: cmake --build build --target t8_advection --parallel \ No newline at end of file + - name: Compile Executable + run: cmake --build build --target t8_advection --parallel \ No newline at end of file From b738c00c07370bf4fb5ee0d0522de138e098512b Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 12:44:17 +0200 Subject: [PATCH 12/24] [run ci] From 1c673562001154079b2891a0ac3ca75bd961ec70 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:18:22 +0200 Subject: [PATCH 13/24] integrates advection into the testsuite --- .github/workflows/test_t8code_advection.yml | 164 +++++++------------- .github/workflows/testsuite.yml | 17 ++ 2 files changed, 77 insertions(+), 104 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 310e63267c..142b7e918b 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -27,7 +27,7 @@ env: on: workflow_call: inputs: - MAKEFLAGS: + MAKEFLAGS: #um aendern in run flags required: true type: string description: 'Make flags to use for compilation (like -j4)' @@ -46,112 +46,68 @@ on: default: 'T8_TEST_LEVEL_FULL' jobs: - fine_grained_trigger: - runs-on: ubuntu-latest - outputs: - run_ci: ${{ steps.set_run_ci.outputs.RUN_CI }} - steps: - - uses: actions/checkout@v4 - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 0 - - name: set the run_ci variable for the testsuite - id: set_run_ci - run: | - if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then - echo "RUN_CI=true" >> $GITHUB_OUTPUT - exit 0 - elif [[ "${{ github.event_name }}" == "merge_group" ]]; then - echo "RUN_CI=true" >> $GITHUB_OUTPUT - exit 0 - fi - latest_commit_message=$(git log -1 --pretty=%B) - if [[ "${{ github.event_name }}" != "schedule" ]]; then - if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then - echo "RUN_CI=true" >> $GITHUB_OUTPUT - exit 0 - elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run ci]"* ]]; then - echo "RUN_CI=true" >> $GITHUB_OUTPUT - exit 0 - elif [[ "${{ github.event.pull_request.ready_for_review }}" == "true" ]]; then - echo "RUN_CI=true" >> $GITHUB_OUTPUT - exit 0 - else - echo "RUN_CI=false" >> $GITHUB_OUTPUT - exit 0 - fi - else - echo "RUN_CI=false" >> $GITHUB_OUTPUT - exit 0 - fi - - preparation: - needs: [fine_grained_trigger] - secrets: inherit - if: needs.fine_grained_trigger.outputs.run_ci == 'true' - uses: ./.github/workflows/test_preparation.yml - strategy: - fail-fast: false - matrix: - MPI: [OFF, ON] - include: - - MAKEFLAGS: -j4 - with: - MAKEFLAGS: ${{ matrix.MAKEFLAGS }} - IGNORE_CACHE: false - CACHE_COUNTER: 9 - MPI: ${{ matrix.MPI }} - - t8code_cmake_tests: - needs: preparation + t8code_advection_test: timeout-minutes: 25 runs-on: ubuntu-latest container: dlramr/t8code-dependencies:t8-dependencies-ubuntu-gcc steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: SC_P4EST_MPI_${{ inputs.MPI }} - - name: untar artifact - run: tar -xf artifact.tar && rm artifact.tar - - name: disable ownership checks - run: git config --global --add safe.directory '*' - - name: Get input vars - run: | - export MAKEFLAGS="${{ inputs.MAKEFLAGS }}" - export MPI="${{ inputs.MPI }}" - export BUILD_TYPE="${{ inputs.BUILD_TYPE }}" - export SC_PATH=$PWD/sc/build/$BUILD_TYPE - export P4EST_PATH=$PWD/p4est/build/$BUILD_TYPE - echo MAKEFLAGS="$MAKEFLAGS" >> $GITHUB_ENV - echo MPI="$MPI" >> $GITHUB_ENV - echo BUILD_TYPE="$BUILD_TYPE" >> $GITHUB_ENV - echo SC_PATH="$SC_PATH" >> $GITHUB_ENV - echo P4EST_PATH="$P4EST_PATH" >> $GITHUB_ENV +# +# Setup +# + - name: Download artifacts + uses: actions/download-artifact@v8 + with: + name: SC_P4EST_MPI_${{ inputs.MPI }} + - name: untar artifact + run: tar -xf artifact.tar && rm artifact.tar + # This seems to be necessary because of the docker container + - name: disable ownership checks + run: git config --global --add safe.directory '*' + - name: Get input vars + run: export MAKEFLAGS="${{ inputs.MAKEFLAGS }}" + && export MPI="${{ inputs.MPI }}" + && export BUILD_TYPE="${{ inputs.BUILD_TYPE }}" + && export SC_PATH=$PWD/sc/build/$BUILD_TYPE + && export P4EST_PATH=$PWD/p4est/build/$BUILD_TYPE + && echo MAKEFLAGS="$MAKEFLAGS" >> $GITHUB_ENV + && echo MPI="$MPI" >> $GITHUB_ENV + && echo BUILD_TYPE="$BUILD_TYPE" >> $GITHUB_ENV + && echo SC_PATH="$SC_PATH" >> $GITHUB_ENV + && echo P4EST_PATH="$P4EST_PATH" >> $GITHUB_ENV - build_advection: - needs: preparation - runs-on: ubuntu-latest - container: dlramr/t8code-dependencies:t8-dependencies-ubuntu-gcc - strategy: - fail-fast: false - matrix: - compiler: [gcc] - flags: - - "-O2" - - "-O3 -Wall -Wextra" - - "-DT8_ENABLE_DEBUG=1" - - "-O2 -DT8_ENABLE_DEBUG=0" - steps: - - name: Configure CMake - run: | - cmake -B build -S . \ - -DCMAKE_C_COMPILER=mpicc \ - -DCMAKE_CXX_COMPILER=mpiccxx \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_FLAGS="${{ matrix.flags }}" \ - -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" +# +# T8CODE +# +# + # build config vars + run: cd build && ninja install $MAKEFLAGS + - name: Set test level + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV + - name: build config variables + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_MESH_HANDLE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" + && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV + # cmake and test with api options + - name: echo cmake line + run: echo cmake ../ $CONFIG_OPTIONS + - name: cmake + run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS + - name: OnFailUploadLog + if: failure() + uses: actions/upload-artifact@v7 + with: + name: cmake_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log + path: build/CMakeFiles/CMakeOutput.log + - name: ninja + run: cd build && ninja $MAKEFLAGS + - name: ninja install + run: cd build && ninja install $MAKEFLAGS + - name: OnFailUploadLog + if: failure() + uses: actions/upload-artifact@v7 + with: + name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log + path: build/Testing/Temporary/LastTest.log + - name: run advection test 1D Mesh + run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 - - name: Compile Executable - run: cmake --build build --target t8_advection --parallel \ No newline at end of file diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 92c72c8853..fe951e3909 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -188,6 +188,23 @@ jobs: BUILD_TYPE: ${{ matrix.BUILD_TYPE }} TEST_LEVEL: ${{ github.event_name == 'pull_request' && 'T8_TEST_LEVEL_MEDIUM' || 'T8_TEST_LEVEL_FULL' }} # Set TEST_LEVEL to medium if the event is a PR, otherwise full. + t8code_advection_test: + needs: preparation + uses: ./.github/workflows/test_t8code_advection.yml + strategy: + fail-fast: false + matrix: + MPI: [ON] # For now the fortran API only supports building with MPI + BUILD_TYPE: [Debug, Release] + include: + - MAKEFLAGS: -j4 + with: + MAKEFLAGS: ${{ matrix.MAKEFLAGS }} + MPI: ${{ matrix.MPI }} + BUILD_TYPE: ${{ matrix.BUILD_TYPE }} + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 'T8_TEST_LEVEL_MEDIUM' || 'T8_TEST_LEVEL_FULL' }} # Set TEST_LEVEL to medium if the event is a PR, otherwise full. + + # Run Valgrind check for every t8code test binary. t8code_valgrind_tests: if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') # Only run the Valgrind check in the scheduled run. From e7592241b37285eef66a08e53b0a4b66712ee5cf Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:18:54 +0200 Subject: [PATCH 14/24] [run ci] From 4fcdaf17926751b49c39892428373d2d1d152637 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:31:04 +0200 Subject: [PATCH 15/24] fix: fixes orphaned run and path error --- .github/workflows/test_t8code_advection.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 142b7e918b..d7bfd4ed27 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -80,6 +80,7 @@ jobs: # # # build config vars + - name: ninja install run: cd build && ninja install $MAKEFLAGS - name: Set test level run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" @@ -109,5 +110,5 @@ jobs: name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log path: build/Testing/Temporary/LastTest.log - name: run advection test 1D Mesh - run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + run: : cd build/example/advection && ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 From 764a06d1e7414424f8e5f82196c47656bc912ddf Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:34:29 +0200 Subject: [PATCH 16/24] fix: removes trailing ; --- .github/workflows/test_t8code_advection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index d7bfd4ed27..3a5729a4f0 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -110,5 +110,5 @@ jobs: name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log path: build/Testing/Temporary/LastTest.log - name: run advection test 1D Mesh - run: : cd build/example/advection && ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + run: cd build/example/advection && ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 From 2c6eaa4e4cbd91eb947f7cb85daf0c8f70715c09 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:50:24 +0200 Subject: [PATCH 17/24] fix: simplifies run command and removes a copy paste mistake --- .github/workflows/test_t8code_advection.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 3a5729a4f0..df47f82ae7 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -80,8 +80,6 @@ jobs: # # # build config vars - - name: ninja install - run: cd build && ninja install $MAKEFLAGS - name: Set test level run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV @@ -109,6 +107,7 @@ jobs: with: name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log path: build/Testing/Temporary/LastTest.log - - name: run advection test 1D Mesh - run: cd build/example/advection && ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + - name: run advection test 1D Mesh + working-directory: build/example/advection + run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 From 2e511771c044e35bc2a6c279924a105f6e6ec1ab Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:52:12 +0200 Subject: [PATCH 18/24] lint: fixes spacing --- .github/workflows/test_t8code_advection.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index df47f82ae7..69b0898a07 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -109,5 +109,5 @@ jobs: path: build/Testing/Temporary/LastTest.log - name: run advection test 1D Mesh - working-directory: build/example/advection - run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + working-directory: build/example/advection + run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 From 804d47b04937667264bca791c1e91bd9d2db9e1c Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:54:24 +0200 Subject: [PATCH 19/24] lint: fixes spacing --- .github/workflows/test_t8code_advection.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 69b0898a07..d3d2c54811 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -109,5 +109,5 @@ jobs: path: build/Testing/Temporary/LastTest.log - name: run advection test 1D Mesh - working-directory: build/example/advection - run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + working-directory: build/example/advection + run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 From fbec48d7eedb249fba9e244c0f0702a04c42ffac Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 14:55:49 +0200 Subject: [PATCH 20/24] [run ci] From 6d15d9d9e9a18e95a7599cac10720b70b6ca68dc Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 16:09:54 +0200 Subject: [PATCH 21/24] feat: adds more tests and a MPI flag --- .github/workflows/test_t8code_advection.yml | 18 +++++++++++++++--- .github/workflows/testsuite.yml | 4 +++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index d3d2c54811..2502209968 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -27,10 +27,14 @@ env: on: workflow_call: inputs: - MAKEFLAGS: #um aendern in run flags + MAKEFLAGS: required: true type: string description: 'Make flags to use for compilation (like -j4)' + MPIFLAGS: + required: true + type: string + description: 'Flags passed to mpirun when executing tests (like -np 4)' MPI: required: true type: string @@ -65,11 +69,13 @@ jobs: run: git config --global --add safe.directory '*' - name: Get input vars run: export MAKEFLAGS="${{ inputs.MAKEFLAGS }}" + && export MPIFLAGS="${{ inputs.MPIFLAGS }}" && export MPI="${{ inputs.MPI }}" && export BUILD_TYPE="${{ inputs.BUILD_TYPE }}" && export SC_PATH=$PWD/sc/build/$BUILD_TYPE && export P4EST_PATH=$PWD/p4est/build/$BUILD_TYPE && echo MAKEFLAGS="$MAKEFLAGS" >> $GITHUB_ENV + && echo MPIFLAGS="$MPIFLAGS" >> $GITHUB_ENV && echo MPI="$MPI" >> $GITHUB_ENV && echo BUILD_TYPE="$BUILD_TYPE" >> $GITHUB_ENV && echo SC_PATH="$SC_PATH" >> $GITHUB_ENV @@ -109,5 +115,11 @@ jobs: path: build/Testing/Temporary/LastTest.log - name: run advection test 1D Mesh - working-directory: build/example/advection - run: ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + working-directory: build/example/advect + run: mpirun $MPIFLAGS ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + - name: run advection test 1D Mesh + working-directory: build/example/advect + run: mpirun $MPIFLAGS ./t8_advection -u 2 -e 7 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + - name: run advection test 3D Mesh + working-directory: build/example/advect + run: mpirun $MPIFLAGS ./t8_advection -u 3 -e 7 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index fe951e3909..868785f89c 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -195,11 +195,13 @@ jobs: fail-fast: false matrix: MPI: [ON] # For now the fortran API only supports building with MPI - BUILD_TYPE: [Debug, Release] + BUILD_TYPE: [Release] include: - MAKEFLAGS: -j4 + MPIFLAGS: -np 4 with: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} + MPIFLAGS: ${{ matrix.MPIFLAGS }} MPI: ${{ matrix.MPI }} BUILD_TYPE: ${{ matrix.BUILD_TYPE }} TEST_LEVEL: ${{ github.event_name == 'pull_request' && 'T8_TEST_LEVEL_MEDIUM' || 'T8_TEST_LEVEL_FULL' }} # Set TEST_LEVEL to medium if the event is a PR, otherwise full. From b5f2ff626e435b3549ed8eb2405bb6d7c78e63bc Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Mon, 31 Aug 2026 16:13:35 +0200 Subject: [PATCH 22/24] [run ci] From b6a56a39c742dbe0d4fa8fe975f5d13fb905d1df Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Wed, 2 Sep 2026 17:38:31 +0200 Subject: [PATCH 23/24] fix: removes vtk writing and changes a couple of flags --- .github/workflows/test_t8code_advection.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_t8code_advection.yml b/.github/workflows/test_t8code_advection.yml index 2502209968..0a38678980 100644 --- a/.github/workflows/test_t8code_advection.yml +++ b/.github/workflows/test_t8code_advection.yml @@ -114,12 +114,12 @@ jobs: name: test-suite_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}_api.log path: build/Testing/Temporary/LastTest.log - - name: run advection test 1D Mesh + - name: run advection test 1D Mesh Constant 1 in x-direction working-directory: build/example/advect - run: mpirun $MPIFLAGS ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 - - name: run advection test 1D Mesh + run: mpirun $MPIFLAGS ./t8_advection -u 1 -e 1 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -o + - name: run advection test 2D Mesh Constant 1 in x,y, and z. working-directory: build/example/advect - run: mpirun $MPIFLAGS ./t8_advection -u 2 -e 7 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 - - name: run advection test 3D Mesh + run: mpirun $MPIFLAGS ./t8_advection -u 2 -e 7 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -o + - name: run advection test 3D Mesh with turbulent flow working-directory: build/example/advect - run: mpirun $MPIFLAGS ./t8_advection -u 3 -e 7 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -v 1 + run: mpirun $MPIFLAGS ./t8_advection -u 3 -e 8 -l 2 -r 1 -T 0.5 -C 0.5 -a 1 -o From c279cdfe9d6e7ba5e18ff2a333ff4b759281c941 Mon Sep 17 00:00:00 2001 From: faouziH21 <2004homsani@gmail.com> Date: Wed, 2 Sep 2026 17:41:19 +0200 Subject: [PATCH 24/24] [run ci]