|
21 | 21 | sofa_root: ${{ github.workspace }}/sofa |
22 | 22 | sofa_version: ${{ matrix.sofa_branch }} |
23 | 23 | sofa_scope: 'standard' |
| 24 | + |
24 | 25 | - name: Checkout source code |
25 | | - uses: actions/checkout@v2 |
| 26 | + uses: actions/checkout@v4 |
26 | 27 | with: |
27 | 28 | path: ${{ env.WORKSPACE_SRC_PATH }} |
28 | 29 |
|
@@ -100,34 +101,17 @@ jobs: |
100 | 101 | echo "LD_LIBRARY_PATH=$WORKSPACE_ARTIFACT_PATH/lib:$SOFA_ROOT/lib:$SOFA_ROOT/plugins/SofaPython3/lib:$LD_LIBRARY_PATH" | tee -a $GITHUB_ENV |
101 | 102 | fi |
102 | 103 |
|
103 | | - - name: Run Tearing_test |
104 | | - if: always() |
105 | | - shell: bash |
106 | | - run: | |
107 | | - chmod +x $WORKSPACE_BUILD_PATH/bin/Tearing_test${{ steps.sofa.outputs.exe }} |
108 | | - cd $WORKSPACE_BUILD_PATH |
109 | | - ./bin/Tearing_test${{ steps.sofa.outputs.exe }} |
110 | | - |
111 | | - - name: Fetch, install and run Regression_test |
112 | | - if: always() |
113 | | - shell: bash |
114 | | - run: | |
115 | | - if [[ "$RUNNER_OS" != "macOS" ]]; then |
116 | | - # Get regression from github releases |
117 | | - mkdir -p "${{ runner.temp }}/regression_tmp/install" |
118 | | - 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 |
119 | | - unzip -qq "${{ runner.temp }}/regression_tmp/${RUNNER_OS}.zip" -d "${{ runner.temp }}/regression_tmp/install" |
120 | | - # Install it in the SOFA bin directory |
121 | | - $SUDO mv "${{ runner.temp }}"/regression_tmp/install/Regression_*/bin/* "${SOFA_ROOT}/bin" |
122 | | - chmod +x ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} |
123 | | - # Setup mandatory env vars |
124 | | - export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/scenes" |
125 | | - export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references" |
126 | | - # Run regression test bench |
127 | | - ${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }} |
128 | | - else |
129 | | - echo "Regression tests are not supported on the CI for macOS yet (TODO)" |
130 | | - fi |
| 104 | + - name: Launch test |
| 105 | + id: tests |
| 106 | + uses: sofa-framework/sofa-test-action@v1.0 |
| 107 | + with: |
| 108 | + sofa_root: ${{ github.workspace }}/sofa |
| 109 | + sofa_version: ${{ steps.sofa.outputs.sofa_version }} |
| 110 | + src_dir: ${{ env.WORKSPACE_SRC_PATH }} |
| 111 | + build_dir: ${{ env.WORKSPACE_BUILD_PATH }} |
| 112 | + python_exe: ${{ steps.sofa.outputs.python_exe }} |
| 113 | + output_dir: ${{ github.workspace }}/tests-results_dir |
| 114 | + nb_parallel_threads: '4' |
131 | 115 |
|
132 | 116 | deploy: |
133 | 117 | name: Deploy artifacts |
|
0 commit comments