From a7d7828b6cd52357334b5c42b2c1eb220cb1d8be Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Wed, 5 Oct 2022 09:31:47 +0200 Subject: [PATCH 1/4] Add PyPI continuous delivery step to CI/CD workflow --- .github/workflows/ci_cd.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 354892335..443ec3372 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -81,3 +81,30 @@ jobs: - name: Import the package run: python -c "import jaxsim" + + publish: + name: Publish to PyPI + needs: test + runs-on: ubuntu-22.04 + + steps: + + - name: Download Python packages + uses: actions/download-artifact@v2 + with: + path: dist + name: dist + + - name: Inspect dist folder + run: ls -lah dist/ + + - name: Publish to PyPI + if: | + github.repository == 'ami-iit/jaxsim' && + ((github.event_name == 'push' && github.ref == 'refs/heads/main') || + (github.event_name == 'release')) + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} + skip_existing: true From d65fa0c6fa93bf4b8bc3c903a2ea06270c3f710e Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Wed, 5 Oct 2022 15:00:30 +0200 Subject: [PATCH 2/4] Update third-party actions --- .github/workflows/ci_cd.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 443ec3372..a26b0ed23 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -15,11 +15,12 @@ jobs: steps: - - uses: actions/checkout@master - - run: git fetch --prune --unshallow + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.8 @@ -32,14 +33,14 @@ jobs: - name: Inspect dist folder run: ls -lah dist/ - - name: Check wheel's abi and platform tag + - name: Check wheel's abi and platform tags run: test $(find dist/ -name *-none-any.whl | wc -l) -gt 0 - name: Run twine check run: twine check dist/* - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: dist/* name: dist @@ -65,12 +66,12 @@ jobs: steps: - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Download Python packages - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: dist name: dist @@ -90,7 +91,7 @@ jobs: steps: - name: Download Python packages - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: dist name: dist @@ -103,7 +104,7 @@ jobs: github.repository == 'ami-iit/jaxsim' && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release')) - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} From 34fa843a876e8393fe554862cc04c9e42745da1c Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Fri, 11 Nov 2022 10:40:54 +0100 Subject: [PATCH 3/4] Install rod dependency from PyPI --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 48055a12a..b23f5c3e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -62,7 +62,7 @@ install_requires = jaxlie jax_dataclasses >= 1.2.2, < 1.4.0 pptree - rod @ git+https://github.com/ami-iit/rod + rod scipy [options.packages.find] From a503f1884c90a7ecfc79d54678767212d973857b Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Fri, 11 Nov 2022 10:42:17 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed012cb8a..91a726390 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,11 @@ Planned features: You can install the project with [`pypa/pip`][pip], preferably in a [virtual environment][venv]: ```bash -pip install "jaxsim @ git+https://github.com/ami-iit/jaxsim" +pip install jaxsim ``` Have a look to [`setup.cfg`](setup.cfg) for a complete list of optional dependencies. -You can install all of them specifying `jaxsim[all]`. +You can install all of them by specifying `jaxsim[all]`. **Note:** if you need GPU support, please follow the official [installation instruction][jax_gpu] of JAX.