Skip to content

Commit 7d31132

Browse files
committed
[ci] Added fetching and installing regression test plugin
1 parent 4dbf3fd commit 7d31132

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,43 @@ jobs:
133133
echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV
134134
fi
135135
136+
# - name: Check environment for tests
137+
# shell: bash
138+
# run: |
139+
# echo '------ ls -la "$WORKSPACE_SRC_PATH" ------'
140+
# ls -la "$WORKSPACE_SRC_PATH"
141+
# echo '------ ls -la "$WORKSPACE_BUILD_PATH" ------'
142+
# ls -la "$WORKSPACE_BUILD_PATH"
143+
# echo '------ ls -la "$WORKSPACE_INSTALL_PATH" ------'
144+
# ls -la "$WORKSPACE_INSTALL_PATH"
145+
# echo '------ ls -la "$WORKSPACE_ARTIFACT_PATH" ------'
146+
# ls -la "$WORKSPACE_ARTIFACT_PATH"
147+
# echo '----------------------'
148+
# echo "SOFA_ROOT = $SOFA_ROOT"
149+
150+
- name: Fetch, install and run Regression_test
151+
id: regression-test
152+
if: always()
153+
shell: bash
154+
run: |
155+
if [[ "$RUNNER_OS" != "macOS" ]]; then
156+
# Get regression from github releases
157+
mkdir -p "${{ runner.temp }}/regression_tmp/install"
158+
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
159+
unzip -qq "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -d "${{ runner.temp }}/regression_tmp/install"
160+
# Install it in the SOFA bin directory
161+
$SUDO mv "${{ runner.temp }}"/regression_tmp/install/Regression_*/bin/* "${SOFA_ROOT}/bin"
162+
chmod +x ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}
163+
# Setup mandatory env vars
164+
export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/examples"
165+
export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references"
166+
export PYTHONPATH=$SOFA_ROOT/plugins/SofaPython3/lib/python3/site-packages
167+
# Run regression test bench
168+
${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}
169+
else
170+
echo "Regression tests are not supported on the CI for macOS yet (TODO)"
171+
fi
172+
136173
deploy:
137174
name: Deploy artifacts
138175
if: always() && startsWith(github.ref, 'refs/heads/main') # we are on a branch (not a PR)

0 commit comments

Comments
 (0)