|
96 | 96 | output_dir: ${{ github.workspace }}/tests-results_dir |
97 | 97 | nb_parallel_threads: '4' |
98 | 98 |
|
99 | | - - name: Set env vars for tests |
100 | | - shell: bash |
101 | | - run: | |
102 | | - # Set env vars for tests |
103 | | - if [[ "$RUNNER_OS" == "Windows" ]]; then |
104 | | - echo "$WORKSPACE_ARTIFACT_PATH/lib" >> $GITHUB_PATH |
105 | | - echo "$WORKSPACE_ARTIFACT_PATH/bin" >> $GITHUB_PATH |
106 | | - echo "$SOFA_ROOT/plugins/SofaPython3/bin" >> $GITHUB_PATH |
107 | | - echo "SOFA_PLUGIN_PATH=$WORKSPACE_ARTIFACT_PATH/bin" | tee -a $GITHUB_ENV |
108 | | - else |
109 | | - echo "SOFA_PLUGIN_PATH=$WORKSPACE_ARTIFACT_PATH/lib" | tee -a $GITHUB_ENV |
110 | | - fi |
111 | | -
|
112 | | - if [[ "$RUNNER_OS" == "macOS" ]]; then |
113 | | - echo "DYLD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$DYLD_LIBRARY_PATH" | tee -a $GITHUB_ENV |
114 | | - fi |
115 | | -
|
116 | | - if [[ "$RUNNER_OS" == "Linux" ]]; then |
117 | | - echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV |
118 | | - fi |
119 | | -
|
120 | | - - name: Fetch, install and run Regression_test |
121 | | - id: regression-test |
122 | | - if: always() |
123 | | - shell: bash |
124 | | - run: | |
125 | | - if [[ "$RUNNER_OS" != "macOS" ]]; then |
126 | | - # Get regression from github releases |
127 | | - mkdir -p "${{ runner.temp }}/regression_tmp/install" |
128 | | - export REGRESSION_URL="https://github.com/sofa-framework/regression/releases/download/release-${{ steps.sofa.outputs.run_branch }}/Regression_test_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${RUNNER_OS}.zip" |
129 | | - curl --output "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -L ${REGRESSION_URL} |
130 | | - echo ${REGRESSION_URL} |
131 | | - unzip -qq "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -d "${{ runner.temp }}/regression_tmp/install" |
132 | | - echo "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" |
133 | | - # Install it in the SOFA bin directory |
134 | | - $SUDO mv "${{ runner.temp }}"/regression_tmp/install/Regression_*/bin/* "${SOFA_ROOT}/bin" |
135 | | - chmod +x ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} |
136 | | - # Setup mandatory env vars |
137 | | - export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/examples" |
138 | | - export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references" |
139 | | - export PYTHONPATH=$SOFA_ROOT/plugins/SofaPython3/lib/python3/site-packages |
140 | | - # Run regression test bench |
141 | | - echo "${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}" |
142 | | - ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} |
143 | | - else |
144 | | - echo "Regression tests are not supported on the CI for macOS yet (TODO)" |
145 | | - fi |
146 | | -
|
147 | 99 | deploy: |
148 | 100 | name: Deploy artifacts |
149 | 101 | if: always() && startsWith(github.ref, 'refs/heads/main') # we are on a branch (not a PR) |
|
0 commit comments