@@ -18,57 +18,28 @@ jobs:
1818 strategy :
1919 fail-fast : false
2020 matrix :
21- os : [ubuntu-20 .04, macos-11 , windows-2019 ]
22- sofa_branch : [master ]
23- python_version : ['3.8 ']
21+ os : [ubuntu-22 .04, macos-12 , windows-2022 ]
22+ sofa_branch : [v23.12 ]
23+ python_version : ['3.10 ']
2424
2525 steps :
26- - name : (Mac) Workaround for homebrew
27- shell : bash
28- if : runner.os == 'macOS'
29- run : |
30- rm -f /usr/local/bin/2to3
31- rm -f /usr/local/bin/idle3
32- rm -f /usr/local/bin/pydoc3
33- rm -f /usr/local/bin/python3
34- rm -f /usr/local/bin/python3-config
35- rm -f /usr/local/bin/2to3-3.11
36- rm -f /usr/local/bin/idle3.11
37- rm -f /usr/local/bin/pydoc3.11
38- rm -f /usr/local/bin/python3.11
39- rm -f /usr/local/bin/python3.11-config
4026
4127 - name : Setup SOFA and environment
4228 id : sofa
43- uses : sofa-framework/sofa-setup-action@v4
29+ uses : sofa-framework/sofa-setup-action@v5
4430 with :
4531 sofa_root : ${{ github.workspace }}/sofa
4632 sofa_version : ${{ matrix.sofa_branch }}
4733 sofa_scope : ' standard'
48- sofa_with_sofapython3 : ' false'
4934 python_version : ' ${{ matrix.python_version }}'
5035
51- - name : Install SofaPython3
52- shell : bash
53- run : |
54- SofaPython3_ROOT="$GITHUB_WORKSPACE/SofaPython3"
55- mkdir -p "${{ runner.temp }}/sp3_tmp/zip" "${{ runner.temp }}/sp3_tmp/binaries" "$SofaPython3_ROOT"
56- url="https://github.com/sofa-framework/SofaPython3/releases/download"
57- url="${url}/release-${{ matrix.sofa_branch }}/SofaPython3_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"
58- echo "Getting SofaPython3 from $url"
59- curl --output "${{ runner.temp }}/sp3_tmp/SofaPython3.zip" -L $url
60- unzip -qq "${{ runner.temp }}/sp3_tmp/SofaPython3.zip" -d "${{ runner.temp }}/sp3_tmp/binaries"
61- mv "${{ runner.temp }}"/sp3_tmp/binaries/SofaPython3_*/* "$SofaPython3_ROOT"
62- echo "SofaPython3_ROOT=$SofaPython3_ROOT" | tee -a $GITHUB_ENV
63- echo "SofaPython3_DIR=$SofaPython3_ROOT/lib/cmake/SofaPython3" | tee -a $GITHUB_ENV
64-
6536 - name : Install SoftRobots
6637 shell : bash
6738 run : |
6839 SoftRobots_ROOT="$GITHUB_WORKSPACE/SoftRobots"
6940 mkdir -p "${{ runner.temp }}/sp3_tmp/zip" "${{ runner.temp }}/sp3_tmp/binaries" "$SoftRobots_ROOT"
7041 url="https://github.com/SofaDefrost/SoftRobots/releases/download"
71- url="${url}/release-${{ matrix.sofa_branch }}/SoftRobots_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }} _for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"
42+ url="${url}/release-${{ matrix.sofa_branch }}/SoftRobots_${{ matrix.sofa_branch }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"
7243 echo "Getting SoftRobots from $url"
7344 curl --output "${{ runner.temp }}/sp3_tmp/SoftRobots.zip" -L $url
7445 unzip -qq "${{ runner.temp }}/sp3_tmp/SoftRobots.zip" -d "${{ runner.temp }}/sp3_tmp/binaries"
@@ -152,6 +123,8 @@ jobs:
152123 ls -la "$WORKSPACE_SRC_PATH"
153124 echo '------ ls -la "$WORKSPACE_BUILD_PATH" ------'
154125 ls -la "$WORKSPACE_BUILD_PATH"
126+ echo '------ ls -la "$WORKSPACE_BUILD_PATH/bin" ------'
127+ ls -la "$WORKSPACE_BUILD_PATH/bin"
155128 echo '------ ls -la "$WORKSPACE_INSTALL_PATH" ------'
156129 ls -la "$WORKSPACE_INSTALL_PATH"
157130 echo '------ ls -la "$WORKSPACE_ARTIFACT_PATH" ------'
@@ -165,13 +138,13 @@ jobs:
165138 if : always()
166139 shell : bash
167140 run : |
141+ chmod +x $WORKSPACE_BUILD_PATH/bin/SoftRobots.Inverse_test${{ steps.sofa.outputs.exe }}
168142 cd $WORKSPACE_BUILD_PATH
169- ./bin/SoftRobots_test ${{ steps.sofa.outputs.exe }}
143+ ./bin/SoftRobots.Inverse_test ${{ steps.sofa.outputs.exe }}
170144
171145 deploy :
172146 name : Deploy artifacts
173- if : always() && startsWith(github.ref, 'refs/heads/') # we are on a branch (not a PR)
174- needs : [build-and-test]
147+ if : always() && startsWith(github.repository, 'SofaDefrost') && (startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/')) # we are not on a fork and on a branch or a tag (not a PR) needs: [build-and-test]
175148 runs-on : ubuntu-latest
176149 continue-on-error : true
177150 steps :
@@ -217,7 +190,7 @@ jobs:
217190 name : ${{ env.RELEASE_NAME }}
218191 tag_name : ${{ env.RELEASE_TAGNAME }}
219192 fail_on_unmatched_files : false
220- target_commitish : ${{ env.RELEASE_NAME }}
193+ target_commitish : ${{ github.sha }}
221194 body : |
222195 Last updated on ${{ env.RELEASE_DATE }}
223196 files : |
0 commit comments