From 9aaf4952e8f1063c912ed6a763f47c0379fe4af9 Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Fri, 7 Jun 2024 11:53:34 -0400 Subject: [PATCH] Changed order, hopefully works --- .github/workflows/ik_python.yml | 53 +++++++++++++++++---------------- ik_python/ik_python.pyi | 2 +- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ik_python.yml b/.github/workflows/ik_python.yml index acf6d62..ff5ed75 100644 --- a/.github/workflows/ik_python.yml +++ b/.github/workflows/ik_python.yml @@ -19,7 +19,30 @@ defaults: run: working-directory: ik_python jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: auto + working-directory: ik_python + - name: Test wheels + run: | + python -m pip install --upgrade pip + python -m pip install ik_python/dist/*.whl + python -m pip install numpy + python ik_python/test/test.py + continue-on-error: false linux: + needs: test runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -55,6 +78,7 @@ jobs: name: wheels-linux-${{ matrix.platform.target }} path: ik_python/dist windows: + needs: test runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -83,6 +107,7 @@ jobs: path: ik_python/dist macos: + needs: test runs-on: ${{ matrix.platform.runner }} strategy: matrix: @@ -103,13 +128,13 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' working-directory: ik_python - - name: Upload wheels - uses: actions/upload-artifact@v4 + -needs: test uses: actions/upload-artifact@v4 with: name: wheels-macos-${{ matrix.platform.target }} path: ik_python/dist sdist: + needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -124,33 +149,11 @@ jobs: with: name: wheels-sdist path: ik_python/dist - test: - runs-on: ubuntu-latest - needs: [linux] - steps: - - uses: actions/download-artifact@v4 - - name: Download wheels - uses: PyO3/maturin-action@v1 - with: - working-directory: ik_python - - name: Test wheels - run: | - python -m pip install --upgrade pip - python -m pip install ik_python/dist/*.whl - python -m pip install numpy - python ik_python/test/test.py - continue-on-error: false - checkifcontinueworks: - runs-on: ubuntu-latest - needs: [test] - steps: - - name: Check if continue-on-error works - run: echo "This step should not run if the previous step fails" release: name: Release runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') - needs: [test] + needs: [linux, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 - name: Publish to PyPI diff --git a/ik_python/ik_python.pyi b/ik_python/ik_python.pyi index add15d9..baa7005 100644 --- a/ik_python/ik_python.pyi +++ b/ik_python/ik_python.pyi @@ -38,7 +38,7 @@ class Robot: :param rotationMatrix: The rotation matrix to use for the inverse kinematics :param positionVector: The position vector to use for the inverse kinematics :return: A tuple containing the rotation values of each joint and whether the solution is least squares - """ + """ ... def forward_kinematics(self, qVals) -> Tuple[List[List[float]], List[float]]: """