From b4ce1d450bf54d68ca0e37e8722cf3441ea2c765 Mon Sep 17 00:00:00 2001 From: bakpaul Date: Fri, 22 Mar 2024 14:35:58 +0100 Subject: [PATCH 1/9] Chaged script version and builders --- .github/workflows/ci.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea130a4..c85db1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,29 +18,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-11, windows-2019] + os: [ubuntu-22.04, macos-12, windows-2022] sofa_branch: [master] python_version: ['3.8'] steps: - - name: (Mac) Workaround for homebrew - shell: bash - if: runner.os == 'macOS' - run: | - rm -f /usr/local/bin/2to3 - rm -f /usr/local/bin/idle3 - rm -f /usr/local/bin/pydoc3 - rm -f /usr/local/bin/python3 - rm -f /usr/local/bin/python3-config - rm -f /usr/local/bin/2to3-3.11 - rm -f /usr/local/bin/idle3.11 - rm -f /usr/local/bin/pydoc3.11 - rm -f /usr/local/bin/python3.11 - rm -f /usr/local/bin/python3.11-config - name: Setup SOFA and environment id: sofa - uses: sofa-framework/sofa-setup-action@v4 + uses: sofa-framework/sofa-setup-action@v5 with: sofa_root: ${{ github.workspace }}/sofa sofa_version: ${{ matrix.sofa_branch }} From 4c1a4bae856e5c08fbd087eabb73842b923f22bf Mon Sep 17 00:00:00 2001 From: bakpaul Date: Tue, 26 Mar 2024 16:38:26 +0100 Subject: [PATCH 2/9] Update ci script branch name --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c85db1f..aff108c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, macos-12, windows-2022] - sofa_branch: [master] - python_version: ['3.8'] + sofa_branch: [v23.12] + python_version: ['3.10'] steps: From d0c52f55364f2294befda0cce26eaef4b5f998a3 Mon Sep 17 00:00:00 2001 From: bakpaul Date: Tue, 26 Mar 2024 17:40:38 +0100 Subject: [PATCH 3/9] install SofaPython3 through sofa-setup-action --- .github/workflows/ci.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aff108c..31925b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,23 +31,8 @@ jobs: sofa_root: ${{ github.workspace }}/sofa sofa_version: ${{ matrix.sofa_branch }} sofa_scope: 'standard' - sofa_with_sofapython3: 'false' python_version: '${{ matrix.python_version }}' - - name: Install SofaPython3 - shell: bash - run: | - SofaPython3_ROOT="$GITHUB_WORKSPACE/SofaPython3" - mkdir -p "${{ runner.temp }}/sp3_tmp/zip" "${{ runner.temp }}/sp3_tmp/binaries" "$SofaPython3_ROOT" - url="https://github.com/sofa-framework/SofaPython3/releases/download" - url="${url}/release-${{ matrix.sofa_branch }}/SofaPython3_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip" - echo "Getting SofaPython3 from $url" - curl --output "${{ runner.temp }}/sp3_tmp/SofaPython3.zip" -L $url - unzip -qq "${{ runner.temp }}/sp3_tmp/SofaPython3.zip" -d "${{ runner.temp }}/sp3_tmp/binaries" - mv "${{ runner.temp }}"/sp3_tmp/binaries/SofaPython3_*/* "$SofaPython3_ROOT" - echo "SofaPython3_ROOT=$SofaPython3_ROOT" | tee -a $GITHUB_ENV - echo "SofaPython3_DIR=$SofaPython3_ROOT/lib/cmake/SofaPython3" | tee -a $GITHUB_ENV - - name: Install SoftRobots shell: bash run: | From 3d7e5ba1e3f7cea2659fb97a94166e2faa53cdaf Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:16:15 +0100 Subject: [PATCH 4/9] Update ci.yml Fix soft robot artifact checkout --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31925b6..ebaf84d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: SoftRobots_ROOT="$GITHUB_WORKSPACE/SoftRobots" mkdir -p "${{ runner.temp }}/sp3_tmp/zip" "${{ runner.temp }}/sp3_tmp/binaries" "$SoftRobots_ROOT" url="https://github.com/SofaDefrost/SoftRobots/releases/download" - url="${url}/release-${{ matrix.sofa_branch }}/SoftRobots_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip" + url="${url}/release-${{ matrix.sofa_branch }}/SoftRobots_${{ matrix.sofa_branch }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip" echo "Getting SoftRobots from $url" curl --output "${{ runner.temp }}/sp3_tmp/SoftRobots.zip" -L $url unzip -qq "${{ runner.temp }}/sp3_tmp/SoftRobots.zip" -d "${{ runner.temp }}/sp3_tmp/binaries" @@ -141,8 +141,7 @@ jobs: deploy: name: Deploy artifacts - if: always() && startsWith(github.ref, 'refs/heads/') # we are on a branch (not a PR) - needs: [build-and-test] + 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] runs-on: ubuntu-latest continue-on-error: true steps: From 027ebd1ed41733f0927871402f58fe4b897337f2 Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:27:56 +0100 Subject: [PATCH 5/9] Find Sofa.Testing --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 93258b5..c0ebdbd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,6 +10,7 @@ set(HEADER_FILES ) include(component/constraint/ConstraintTest.cmake) include(component/solver/SolverTest.cmake) +find_package(Sofa.Testing) add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${RC_FILES}) target_include_directories(${PROJECT_NAME} PRIVATE "${SoftRobots_INCLUDE_DIRS}") From f771c9c0772544479f5cd3048ca83b660444667c Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:19:14 +0100 Subject: [PATCH 6/9] FIX artifact publish for tags --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebaf84d..17fb4f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,7 +187,7 @@ jobs: name: ${{ env.RELEASE_NAME }} tag_name: ${{ env.RELEASE_TAGNAME }} fail_on_unmatched_files: false - target_commitish: ${{ env.RELEASE_NAME }} + target_commitish: ${{ github.sha }} body: | Last updated on ${{ env.RELEASE_DATE }} files: | From 1c6197ad2e45d25a96bc86cfecc7dd159178970d Mon Sep 17 00:00:00 2001 From: Hugo Talbot Date: Fri, 29 Mar 2024 11:43:24 +0100 Subject: [PATCH 7/9] chmod on tests exe --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17fb4f3..c767f97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,6 +136,7 @@ jobs: if: always() shell: bash run: | + chmod +x $WORKSPACE_BUILD_PATH/bin/SoftRobots_test${{ steps.sofa.outputs.exe }} cd $WORKSPACE_BUILD_PATH ./bin/SoftRobots_test${{ steps.sofa.outputs.exe }} From 9440f2ee1b0fea3dae8c69e464428a30d5ab9229 Mon Sep 17 00:00:00 2001 From: Hugo Talbot Date: Thu, 4 Apr 2024 08:37:15 +0200 Subject: [PATCH 8/9] add ls to investigate --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c767f97..6c5c2b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,6 +123,8 @@ jobs: ls -la "$WORKSPACE_SRC_PATH" echo '------ ls -la "$WORKSPACE_BUILD_PATH" ------' ls -la "$WORKSPACE_BUILD_PATH" + echo '------ ls -la "$WORKSPACE_BUILD_PATH/bin" ------' + ls -la "$WORKSPACE_BUILD_PATH/bin" echo '------ ls -la "$WORKSPACE_INSTALL_PATH" ------' ls -la "$WORKSPACE_INSTALL_PATH" echo '------ ls -la "$WORKSPACE_ARTIFACT_PATH" ------' From a8150ff529df045acb06a0114c6d8df7331e5bd5 Mon Sep 17 00:00:00 2001 From: Hugo Talbot Date: Thu, 4 Apr 2024 09:24:06 +0200 Subject: [PATCH 9/9] fix test launching --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c5c2b0..77aaffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,9 +138,9 @@ jobs: if: always() shell: bash run: | - chmod +x $WORKSPACE_BUILD_PATH/bin/SoftRobots_test${{ steps.sofa.outputs.exe }} + chmod +x $WORKSPACE_BUILD_PATH/bin/SoftRobots.Inverse_test${{ steps.sofa.outputs.exe }} cd $WORKSPACE_BUILD_PATH - ./bin/SoftRobots_test${{ steps.sofa.outputs.exe }} + ./bin/SoftRobots.Inverse_test${{ steps.sofa.outputs.exe }} deploy: name: Deploy artifacts