From 906e17ff98440a5f6470e9e6cd3c836adee47028 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Mon, 28 Sep 2026 10:03:09 +0200 Subject: [PATCH 1/7] Use the python scripts instead of the bash-based scripts --- .github/workflows/CI_build_and_test.yml | 84 +++++++++++++++++++------ 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI_build_and_test.yml b/.github/workflows/CI_build_and_test.yml index 6bdef27983d..6f85df8e09a 100644 --- a/.github/workflows/CI_build_and_test.yml +++ b/.github/workflows/CI_build_and_test.yml @@ -103,7 +103,7 @@ jobs: echo "Workspace folder for this build will be $WORKSPACE" - - name: Clone SOFA and CI + - name: Clone SOFA, CI and Regression id: clone shell: bash run: | @@ -170,6 +170,33 @@ jobs: cd $WORKSPACE + ## Clone Regression and use ci-depends-on structure + regression_branch=${{ inputs.sofa-branch-name }} + regression_repo_url="https://www.github.com/sofa-framework/Regression" + + + # check if ci has a ci-depends-on + regression_ci_depends_on=$(echo "${{ inputs.ci-depends-on }}" | jq .Regression) + if [ -n "${{ inputs.ci-depends-on }}" ] && [ "$regression_ci_depends_on" != "null" ]; then + echo "ci-depends-on for Regression repository detected." + regression_repo_url=$(echo "${{ inputs.ci-depends-on }}" | jq .Regression.repo_url) + regression_branch=$(echo "${{ inputs.ci-depends-on }}" | jq .Regression.branch_name) + fi + echo "REGRESSION_BRANCH=$regression_branch" >> $GITHUB_ENV + + + echo "Cloning Regression from remote ${regression_repo_url}, selecting branch ${regression_branch}" + + if [ -d $WORKSPACE/Regression ]; then + rm -rf $WORKSPACE/Regression + fi + REGRESSION_DIR=$WORKSPACE/Regression + echo "REGRESSION_DIR=$REGRESSION_DIR" >> $GITHUB_ENV + + git clone -b ${regression_branch//\"} --single-branch ${regression_repo_url//\"} + + cd $WORKSPACE + ## Setup build folder if [ "${{ inputs.force-full-build }}" == "true" ] && [ -d $WORKSPACE/build ]; then rm -rf $WORKSPACE/build @@ -286,11 +313,13 @@ jobs: DOCKER_SRC_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $SRC_DIR)" DOCKER_BUILD_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $BUILD_DIR)" DOCKER_CI_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $CI_DIR)" + DOCKER_REGRESSION_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $REGRESSION_DIR)" DOCKER_LOG_DIR="/workspace/$(realpath --relative-to=$WORKSPACE ${{ env.LOG_DIR }})" echo "DOCKER_SRC_DIR=$DOCKER_SRC_DIR" >> $GITHUB_ENV echo "DOCKER_BUILD_DIR=$DOCKER_BUILD_DIR" >> $GITHUB_ENV echo "DOCKER_CI_DIR=$DOCKER_CI_DIR" >> $GITHUB_ENV + echo "DOCKER_REGRESSION_DIR=$DOCKER_REGRESSION_DIR" >> $GITHUB_ENV echo "DOCKER_LOG_DIR=$DOCKER_LOG_DIR" >> $GITHUB_ENV export XDG_CACHE_HOME="/cache" @@ -320,17 +349,24 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} UNIT" + /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_unit_tests.py --build-dir ${DOCKER_BUILD_DIR} --results-dir \${RESULTS_DIR}/unit -j \${VM_MAX_PARALLEL_TESTS}" else echo "Launching unit test suite." - bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "UNIT" + . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + env + ${VM_PYTHON3_EXECUTABLE} ${CI_DIR}/scripts/tests/sofa_unit_tests.py --build-dir "${BUILD_DIR}" --results-dir "${RESULTS_DIR}/unit" -j ${VM_MAX_PARALLEL_TESTS} fi - if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"unit-tests_"* ]]; then + if [[ ! "$(cd "${{ env.BUILD_DIR }}/tests_results/unit" && find . -maxdepth 1 -type f)" == *"summary"* ]]; then exit 1 + else + if [[ "$(awk -F= '$1=="crashes" {print $2}' ${{ env.BUILD_DIR }}/tests_results/unit/summary.txt)" != '0' || "$(awk -F= '$1=="failures" {print $2}' ${{ env.BUILD_DIR }}/tests_results/unit/summary.txt)" != "0" ]]; then + exit 1 + fi fi + - name: Scene tests id: scene-tests-step if: always() && steps.build-step.outcome == 'success' && inputs.generate-binaries == false && inputs.with-all-tests == true @@ -344,15 +380,21 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} SCENE" + /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_scene_tests.py --src-dir "${DOCKER_SRC_DIR}" --build-dir \"${DOCKER_BUILD_DIR}\" --results-dir \"\${RESULTS_DIR}/scene\" -j \${VM_MAX_PARALLEL_TESTS}" else echo "Launching scene test suite." - bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "SCENE" + . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + env + ${VM_PYTHON3_EXECUTABLE} ${CI_DIR}/scripts/tests/sofa_scene_tests.py --src-dir "${SRC_DIR}" --build-dir "${BUILD_DIR}" --results-dir "${RESULTS_DIR}/scene" -j ${VM_MAX_PARALLEL_TESTS} fi - if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"scene-tests_"* ]]; then + if [[ ! "$(cd "${{ env.BUILD_DIR }}/tests_results/scene" && find . -maxdepth 1 -type f)" == *"summary"* ]]; then exit 1 + else + if [[ "$(awk -F= '$1=="crashes" {print $2}' ${{ env.BUILD_DIR }}/tests_results/scene/summary.txt)" != '0' || "$(awk -F= '$1=="failures" {print $2}' ${{ env.BUILD_DIR }}/tests_results/scene/summary.txt)" != "0" ]]; then + exit 1 + fi fi - name: Regression tests @@ -368,15 +410,21 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} REGRESSION" + /bin/bash -c "export REGRESSION_DIR="$DOCKER_REGRESSION_DIR"; cd /workspace;. ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${DOCKER_SRC_DIR}/examples" --input "${DOCKER_SRC_DIR}/applications" --input "${DOCKER_BUILD_DIR}/external_directories/fetched" --output-logs-errors "\${RESULTS_DIR}/regression" --legacy-regression --jobs \${VM_MAX_PARALLEL_TESTS} " else echo "Launching regression test suite" - bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "REGRESSION" + . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + env + ${VM_PYTHON3_EXECUTABLE} ${REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${SRC_DIR}/examples" --input "${SRC_DIR}/applications" --input "${BUILD_DIR}/external_directories/fetched" --output-logs-errors "${RESULTS_DIR}/regression" --legacy-regression -j ${VM_MAX_PARALLEL_TESTS} fi - if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"regression-tests_"* ]]; then - exit 1 + if [[ ! "$(cd "${{ env.BUILD_DIR }}/tests_results/regression" && find . -maxdepth 1 -type f)" == *"summary"* ]]; then + exit 1 + else + if [[ "$(awk -F= '$1=="crashes" {print $2}' ${{ env.BUILD_DIR }}/tests_results/regression/summary.txt)" != '0' || "$(awk -F= '$1=="failures" {print $2}' ${{ env.BUILD_DIR }}/tests_results/regression/summary.txt)" != "0" ]]; then + exit 1 + fi fi @@ -433,7 +481,7 @@ jobs: fi if [[ "${{ inputs.generate-binaries }}" == "false" ]]; then - if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" != "" ]]; then + if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -mindepth 2 -maxdepth 2 -type f -name 'summary.txt')" != "" ]]; then echo "❌ Tests have resulted in : " echo "" python3 ${{ env.CI_DIR }}/scripts/generate-tests-table.py "${{ env.BUILD_DIR }}/tests_results/" @@ -443,18 +491,18 @@ jobs: echo "#----------------------------------------#" for testType in 'unit' 'scene' 'regression'; do + capitalized="$(echo "${testType:0:1}" | tr '[:lower:]' '[:upper:]')${testType:1}" + echo -e "${bold}${capitalized}:${normal}" for errorType in 'errors' 'crashes' 'failures'; do - if [ -f "${{ env.BUILD_DIR }}/tests_results/${testType}-tests_${errorType}" ]; then - capitalized="$(echo "${testType:0:1}" | tr '[:lower:]' '[:upper:]')${testType:1}" - echo "" - echo -e "${bold}${capitalized} ${errorType}:${normal}" + if [ -f "${{ env.BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" ]; then echo "" - cat "${{ env.BUILD_DIR }}/tests_results/${testType}-tests_${errorType}" + cat "${{ env.BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" echo "" - echo "#----------------------------------------#" fi done + echo "#----------------------------------------#" + echo "" done echo -e "${bold}You can download all logs here : ${{ steps.publish-tests-logs.outputs.artifact-url }}${normal}" exit 1 From c875728e597676c4815be88bc9f1336ef143cc05 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Mon, 28 Sep 2026 10:03:43 +0200 Subject: [PATCH 2/7] TO_REVERT --- .../workflows/CI_trigger_build_and_tests.yml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI_trigger_build_and_tests.yml b/.github/workflows/CI_trigger_build_and_tests.yml index da2efb038be..92b77c9e147 100644 --- a/.github/workflows/CI_trigger_build_and_tests.yml +++ b/.github/workflows/CI_trigger_build_and_tests.yml @@ -28,10 +28,10 @@ on: preset: type: choice description: Which preset to use for compilation - options: + options: - standard - supported-plugins - - full + - full - standard-dev - supported-plugins-dev - full-dev @@ -39,16 +39,16 @@ on: builder-os: type: choice description: On which OS run the binaries generation - options: + options: - '["sh-ubuntu_gcc_release"]' - '["sh-macos_clang_release"]' - '["sh-ubuntu_gcc_release","sh-macos_clang_release"]' default: '["sh-ubuntu_gcc_release","sh-macos_clang_release"]' - + # PR-related build (open, labels, push) pull_request: types: [opened, synchronize] - + # CI for dashboard master push: branches: @@ -79,7 +79,7 @@ jobs: PR_BRANCH_NAME: ${{ steps.export-vars.outputs.PR_BRANCH_NAME }} PR_COMMIT_SHA: ${{ steps.export-vars.outputs.PR_COMMIT_SHA }} BUILDER_OS: ${{ steps.export-vars.outputs.BUILDER_OS }} - + steps: - name: Default values of environment variables run: | @@ -97,7 +97,7 @@ jobs: echo "PR_BRANCH_NAME=" >> $GITHUB_ENV # PR_BRANCH_NAME: "" echo "PR_COMMIT_SHA=HEAD" >> $GITHUB_ENV # PR_COMMIT_SHA: "HEAD" echo 'BUILDER_OS=["sh-ubuntu_gcc_release"]' >> $GITHUB_ENV # BUILDER_OS: ["sh-ubuntu_gcc_release"] - + - name: Run on dispatch if: ${{ github.event_name == 'workflow_dispatch' }} run: | @@ -122,7 +122,7 @@ jobs: fi fi echo "Python version $PYTHON is valid." - + # Save all information in environment variables echo "SOFA_BRANCH_NAME=${{ github.event.inputs.branch }}" >> $GITHUB_ENV echo "SOFA_COMMIT_SHA=HEAD" >> $GITHUB_ENV @@ -170,11 +170,11 @@ jobs: PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} run: | echo "This step runs only when a PR is opened or synchronized." - + # Trigger the Build action # Warning ! This script also changes ENV variables python ci/scripts/checkPRInfoBeforeBuild.py - + - name: Export environment variables as outputs id: export-vars run: | @@ -184,7 +184,7 @@ jobs: echo "Branch name should be either master or any release branch (e.g., v25.06)" exit 1 fi - + echo "SOFA_BRANCH_NAME=${SOFA_BRANCH_NAME}" >> $GITHUB_OUTPUT echo "SOFA_COMMIT_SHA=${SOFA_COMMIT_SHA}" >> $GITHUB_OUTPUT echo "PRESET=${PRESET}" >> $GITHUB_OUTPUT @@ -192,8 +192,8 @@ jobs: echo "CI_DEPENDS_ON=${CI_DEPENDS_ON}" >> $GITHUB_OUTPUT echo "WITH_ALL_TESTS=${WITH_ALL_TESTS}" >> $GITHUB_OUTPUT echo "FORCE_FULL_BUILD=${FORCE_FULL_BUILD}" >> $GITHUB_OUTPUT - echo "EXTERNAL_PLUGINS=${EXTERNAL_PLUGINS}" >> $GITHUB_OUTPUT - echo "ADDITIONNAL_CMAKE_FLAGS=${ADDITIONNAL_CMAKE_FLAGS}" >> $GITHUB_OUTPUT + echo "EXTERNAL_PLUGINS=${EXTERNAL_PLUGINS}" >> $GITHUB_OUTPUT + echo "ADDITIONNAL_CMAKE_FLAGS=${ADDITIONNAL_CMAKE_FLAGS}" >> $GITHUB_OUTPUT echo "GENERATE_BINARIES=${GENERATE_BINARIES}" >> $GITHUB_OUTPUT echo "PR_OWNER_URL=${PR_OWNER_URL}" >> $GITHUB_OUTPUT echo "PR_BRANCH_NAME=${PR_BRANCH_NAME}" >> $GITHUB_OUTPUT @@ -208,7 +208,7 @@ jobs: build-on: needs: filter_build if: ${{ github.repository_owner == 'sofa-framework' }} - uses: sofa-framework/sofa/.github/workflows/CI_build_and_test.yml@master + uses: bakpaul/sofa/.github/workflows/CI_build_and_test.yml@26_09_use_python_based_ci_script_on_unix_ci with: sofa-branch-name: ${{ needs.filter_build.outputs.SOFA_BRANCH_NAME }} sofa-commit-sha: ${{ needs.filter_build.outputs.SOFA_COMMIT_SHA }} From 4dfffca05127b00e5bf14c281a4502ac7cb5269c Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:55:28 +0200 Subject: [PATCH 3/7] Update CI_build_and_test.yml --- .github/workflows/CI_build_and_test.yml | 35 +++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI_build_and_test.yml b/.github/workflows/CI_build_and_test.yml index 6f85df8e09a..5e94e2f9e7a 100644 --- a/.github/workflows/CI_build_and_test.yml +++ b/.github/workflows/CI_build_and_test.yml @@ -349,11 +349,11 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_unit_tests.py --build-dir ${DOCKER_BUILD_DIR} --results-dir \${RESULTS_DIR}/unit -j \${VM_MAX_PARALLEL_TESTS}" + /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/tests/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_unit_tests.py --build-dir ${DOCKER_BUILD_DIR} --results-dir \${RESULTS_DIR}/unit -j \${VM_MAX_PARALLEL_TESTS}" else echo "Launching unit test suite." - . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + . ${CI_DIR}/scripts/tests/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" env ${VM_PYTHON3_EXECUTABLE} ${CI_DIR}/scripts/tests/sofa_unit_tests.py --build-dir "${BUILD_DIR}" --results-dir "${RESULTS_DIR}/unit" -j ${VM_MAX_PARALLEL_TESTS} fi @@ -380,11 +380,11 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_scene_tests.py --src-dir "${DOCKER_SRC_DIR}" --build-dir \"${DOCKER_BUILD_DIR}\" --results-dir \"\${RESULTS_DIR}/scene\" -j \${VM_MAX_PARALLEL_TESTS}" + /bin/bash -c "cd /workspace; . ${DOCKER_CI_DIR}/scripts/tests/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_CI_DIR}/scripts/tests/sofa_scene_tests.py --src-dir "${DOCKER_SRC_DIR}" --build-dir \"${DOCKER_BUILD_DIR}\" --results-dir \"\${RESULTS_DIR}/scene\" -j \${VM_MAX_PARALLEL_TESTS}" else echo "Launching scene test suite." - . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + . ${CI_DIR}/scripts/tests/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" env ${VM_PYTHON3_EXECUTABLE} ${CI_DIR}/scripts/tests/sofa_scene_tests.py --src-dir "${SRC_DIR}" --build-dir "${BUILD_DIR}" --results-dir "${RESULTS_DIR}/scene" -j ${VM_MAX_PARALLEL_TESTS} fi @@ -410,11 +410,11 @@ jobs: docker run --rm \ --user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "export REGRESSION_DIR="$DOCKER_REGRESSION_DIR"; cd /workspace;. ${DOCKER_CI_DIR}/scripts/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${DOCKER_SRC_DIR}/examples" --input "${DOCKER_SRC_DIR}/applications" --input "${DOCKER_BUILD_DIR}/external_directories/fetched" --output-logs-errors "\${RESULTS_DIR}/regression" --legacy-regression --jobs \${VM_MAX_PARALLEL_TESTS} " + /bin/bash -c "export REGRESSION_DIR="$DOCKER_REGRESSION_DIR"; cd /workspace;. ${DOCKER_CI_DIR}/scripts/tests/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${DOCKER_SRC_DIR}/examples" --input "${DOCKER_SRC_DIR}/applications" --input "${DOCKER_BUILD_DIR}/external_directories/fetched" --output-logs-errors "\${RESULTS_DIR}/regression" --legacy-regression --jobs \${VM_MAX_PARALLEL_TESTS} " else echo "Launching regression test suite" - . ${CI_DIR}/scripts/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" + . ${CI_DIR}/scripts/tests/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" env ${VM_PYTHON3_EXECUTABLE} ${REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${SRC_DIR}/examples" --input "${SRC_DIR}/applications" --input "${BUILD_DIR}/external_directories/fetched" --output-logs-errors "${RESULTS_DIR}/regression" --legacy-regression -j ${VM_MAX_PARALLEL_TESTS} fi @@ -481,39 +481,40 @@ jobs: fi if [[ "${{ inputs.generate-binaries }}" == "false" ]]; then - if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -mindepth 2 -maxdepth 2 -type f -name 'summary.txt')" != "" ]]; then + if [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]] && + [[ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/unit/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/scene/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/regression/summary.txt" ]]; then echo "❌ Tests have resulted in : " echo "" - python3 ${{ env.CI_DIR }}/scripts/generate-tests-table.py "${{ env.BUILD_DIR }}/tests_results/" + python3 ${{ env.CI_DIR }}/scripts/tests/generate-tests-table.py "${{ env.SOFA_BUILD_DIR }}/tests_results/" echo "" echo "#----------------------------------------#" echo "#---------------Quick Logs---------------#" echo "#----------------------------------------#" for testType in 'unit' 'scene' 'regression'; do - capitalized="$(echo "${testType:0:1}" | tr '[:lower:]' '[:upper:]')${testType:1}" - echo -e "${bold}${capitalized}:${normal}" for errorType in 'errors' 'crashes' 'failures'; do - if [ -f "${{ env.BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" ]; then + if [ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" ]; then + capitalized="$(echo "${testType:0:1}" | tr '[:lower:]' '[:upper:]')${testType:1}" echo "" - cat "${{ env.BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" + echo -e "${bold}${capitalized} ${errorType}:${normal}" echo "" + cat "${{ env.SOFA_BUILD_DIR }}/tests_results/${testType}/${testType}_${errorType}.txt" + echo "" + echo "#----------------------------------------#" fi done - echo "#----------------------------------------#" - echo "" done echo -e "${bold}You can download all logs here : ${{ steps.publish-tests-logs.outputs.artifact-url }}${normal}" exit 1 elif [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]]; then - echo "❌ Something whent wrong during one of the tests steps" + echo "❌ Something went wrong during one of the tests steps" echo -e "${bold}Please check this action logs, and download tests logs here: ${{ steps.publish-tests-logs.outputs.artifact-url }}${normal}" exit 1 else - echo "✅ Tests where successful : " + echo "✅ Tests were successful : " echo "" - python3 ${{ env.CI_DIR }}/scripts/generate-tests-table.py "${{ env.BUILD_DIR }}/tests_results/" + python3 ${{ env.CI_DIR }}/scripts/tests/generate-tests-table.py "${{ env.SOFA_BUILD_DIR }}/tests_results/" echo "" fi fi From c463eea14d01a2b45b6ae3eb67faf6f8f73c044a Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Wed, 7 Oct 2026 16:53:18 +0200 Subject: [PATCH 4/7] fix quick summary --- .github/workflows/CI_build_and_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI_build_and_test.yml b/.github/workflows/CI_build_and_test.yml index 5e94e2f9e7a..e116d0ec214 100644 --- a/.github/workflows/CI_build_and_test.yml +++ b/.github/workflows/CI_build_and_test.yml @@ -481,8 +481,9 @@ jobs: fi if [[ "${{ inputs.generate-binaries }}" == "false" ]]; then - if [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]] && - [[ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/unit/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/scene/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/regression/summary.txt" ]]; then + if [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]] && + [[ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/unit/summary.txt" ]] && + [[ "${{ inputs.with-all-tests }}" == "false" || "${{ inputs.with-all-tests }}" == "true" && ( -f "${{ env.SOFA_BUILD_DIR }}/tests_results/scene/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/regression/summary.txt" ) ]]; then echo "❌ Tests have resulted in : " echo "" python3 ${{ env.CI_DIR }}/scripts/tests/generate-tests-table.py "${{ env.SOFA_BUILD_DIR }}/tests_results/" From b4e7310df6a6ab420766b485d73b40fc1c42302c Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Tue, 27 Oct 2026 17:30:19 +0100 Subject: [PATCH 5/7] Don t use legacy, use new references instead --- .github/workflows/CI_build_and_test.yml | 4 ++-- .github/workflows/CI_macos_linux_windows_pixi.yml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_build_and_test.yml b/.github/workflows/CI_build_and_test.yml index 81dcd0c82e1..9e886fa1262 100644 --- a/.github/workflows/CI_build_and_test.yml +++ b/.github/workflows/CI_build_and_test.yml @@ -409,13 +409,13 @@ jobs: docker run --rm \ --user 1000:1000 --network=host -v $WORKSPACE:/workspace \ ${DOCKER_IMAGE} \ - /bin/bash -c "export REGRESSION_DIR="$DOCKER_REGRESSION_DIR"; cd /workspace;. ${DOCKER_CI_DIR}/scripts/tests/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${DOCKER_SRC_DIR}/examples" --input "${DOCKER_SRC_DIR}/applications" --input "${DOCKER_BUILD_DIR}/external_directories/fetched" --output-logs-errors "\${RESULTS_DIR}/regression" --legacy-regression --jobs \${VM_MAX_PARALLEL_TESTS} " + /bin/bash -c "export REGRESSION_DIR="$DOCKER_REGRESSION_DIR"; cd /workspace;. ${DOCKER_CI_DIR}/scripts/tests/setup-test-env.sh \"${DOCKER_BUILD_DIR}\" \"${DOCKER_CI_DIR}/scripts/\" \"${NODE_NAME}\" \"${{ inputs.python-version }}\"; env ; \${VM_PYTHON3_EXECUTABLE} ${DOCKER_REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${DOCKER_SRC_DIR}/examples" --input "${DOCKER_SRC_DIR}/applications" --input "${DOCKER_BUILD_DIR}/external_directories/fetched" --output-logs-errors "\${RESULTS_DIR}/regression" --jobs \${VM_MAX_PARALLEL_TESTS} " else echo "Launching regression test suite" . ${CI_DIR}/scripts/tests/setup-test-env.sh "${BUILD_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" env - ${VM_PYTHON3_EXECUTABLE} ${REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${SRC_DIR}/examples" --input "${SRC_DIR}/applications" --input "${BUILD_DIR}/external_directories/fetched" --output-logs-errors "${RESULTS_DIR}/regression" --legacy-regression -j ${VM_MAX_PARALLEL_TESTS} + ${VM_PYTHON3_EXECUTABLE} ${REGRESSION_DIR}/SofaRegressionProgram/SofaRegressionProgram.py --input "${SRC_DIR}/examples" --input "${SRC_DIR}/applications" --input "${BUILD_DIR}/external_directories/fetched" --output-logs-errors "${RESULTS_DIR}/regression" -j ${VM_MAX_PARALLEL_TESTS} fi if [[ ! "$(cd "${{ env.BUILD_DIR }}/tests_results/regression" && find . -maxdepth 1 -type f)" == *"summary"* ]]; then diff --git a/.github/workflows/CI_macos_linux_windows_pixi.yml b/.github/workflows/CI_macos_linux_windows_pixi.yml index 334185561cf..17790c480c7 100644 --- a/.github/workflows/CI_macos_linux_windows_pixi.yml +++ b/.github/workflows/CI_macos_linux_windows_pixi.yml @@ -379,7 +379,6 @@ jobs: --input "$env:SRC_DIR\applications" ` --input "$env:BUILD_DIR\external_directories\fetched" ` --output-logs-errors "$RegResultsDir" ` - --legacy-regression ` -j $env:VM_MAX_PARALLEL_TESTS if (-not (Test-Path "$RegResultsDir\*summary*")) { exit 1 } From 4be9d8c48ad102998772ae181943d273ad7bfb3b Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Wed, 28 Oct 2026 16:19:53 +0100 Subject: [PATCH 6/7] Fix summary --- .github/workflows/CI_build_and_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_build_and_test.yml b/.github/workflows/CI_build_and_test.yml index 9e886fa1262..4c4dbf7053b 100644 --- a/.github/workflows/CI_build_and_test.yml +++ b/.github/workflows/CI_build_and_test.yml @@ -480,9 +480,8 @@ jobs: fi if [[ "${{ inputs.generate-binaries }}" == "false" ]]; then - if [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]] && - [[ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/unit/summary.txt" ]] && - [[ "${{ inputs.with-all-tests }}" == "false" || "${{ inputs.with-all-tests }}" == "true" && ( -f "${{ env.SOFA_BUILD_DIR }}/tests_results/scene/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/regression/summary.txt" ) ]]; then + if [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]] && + [[ -f "${{ env.SOFA_BUILD_DIR }}/tests_results/unit/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/scene/summary.txt" && -f "${{ env.SOFA_BUILD_DIR }}/tests_results/regression/summary.txt" ]]; then echo "❌ Tests have resulted in : " echo "" python3 ${{ env.CI_DIR }}/scripts/tests/generate-tests-table.py "${{ env.SOFA_BUILD_DIR }}/tests_results/" From ec12526beedb8dce5cba210c01167b2d08707904 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Thu, 29 Oct 2026 15:58:14 +0100 Subject: [PATCH 7/7] Increase SofaScene timeout so that scene tests passes --- examples/.scene-tests | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/.scene-tests b/examples/.scene-tests index ce795d51776..14a1fb4daf9 100644 --- a/examples/.scene-tests +++ b/examples/.scene-tests @@ -53,3 +53,7 @@ ignore "Benchmark/Performance/Bar16-spring-rk4-CudaVec3f.py" # Crash on windows ignore "Component/Constraint/Lagrangian/PrecomputedConstraintCorrection.scn" + + +# Slow on windows github-hosted machines +timeout "Demos/SofaScene.scn" 60