diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9f029a..90bfcc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: else echo "SOFA_PLUGIN_PATH=$WORKSPACE_ARTIFACT_PATH/lib" | tee -a $GITHUB_ENV fi - + if [[ "$RUNNER_OS" == "macOS" ]]; then echo "DYLD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$DYLD_LIBRARY_PATH" | tee -a $GITHUB_ENV fi @@ -100,6 +100,35 @@ jobs: echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV fi + - name: Run Tearing_test + if: always() + shell: bash + run: | + chmod +x $WORKSPACE_BUILD_PATH/bin/Tearing_test${{ steps.sofa.outputs.exe }} + cd $WORKSPACE_BUILD_PATH + ./bin/Tearing_test${{ steps.sofa.outputs.exe }} + + - name: Fetch, install and run Regression_test + if: always() + shell: bash + run: | + if [[ "$RUNNER_OS" != "macOS" ]]; then + # Get regression from github releases + mkdir -p "${{ runner.temp }}/regression_tmp/install" + curl --output "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -L https://github.com/sofa-framework/regression/releases/download/release-master/Regression_test_master_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${RUNNER_OS}.zip + unzip -qq "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -d "${{ runner.temp }}/regression_tmp/install" + # Install it in the SOFA bin directory + $SUDO mv "${{ runner.temp }}"/regression_tmp/install/Regression_*/bin/* "${SOFA_ROOT}/bin" + chmod +x ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} + # Setup mandatory env vars + export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/scenes" + export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references" + # Run regression test bench + ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} + else + echo "Regression tests are not supported on the CI for macOS yet (TODO)" + fi + deploy: name: Deploy artifacts if: always() && startsWith(github.ref, 'refs/heads/main') # we are on a branch (not a PR)