From 96344ba0e618e3790d11c7b1b40b76d5414cbd15 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Tue, 4 Oct 2022 17:13:26 +0200 Subject: [PATCH 1/5] Update setuptools_scm pinning in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 99022fce3..5e229ba9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ build-backend = "setuptools.build_meta" requires = [ "wheel", "setuptools>=45", - "setuptools_scm[toml]>=6.0", + "setuptools_scm[toml]>=6.2", ] [tool.setuptools_scm] From 2d68cbdc8040366163d86b4b773fbfd01dd1672f Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Wed, 5 Oct 2022 09:16:39 +0200 Subject: [PATCH 2/5] Add continuous integration workflow --- .github/workflows/ci_cd.yml | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 000000000..eb3bd46bd --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,81 @@ +name: Python CI/CD + +on: + push: + pull_request: + release: + types: + - published + +jobs: + + package: + name: Package the project + runs-on: ubuntu-22.04 + + steps: + + - uses: actions/checkout@master + - run: git fetch --prune --unshallow + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Python tools + run: pip install build twine + + - name: Create distributions + run: python -m build -o dist/ + + - name: Inspect dist folder + run: ls -lah dist/ + + - name: Check wheel's abi and platform tag + 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 + with: + path: dist/* + name: dist + + test: + name: 'Python${{ matrix.python }}@${{ matrix.os }}' + needs: package + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-22.04 + - macos-latest + - windows-latest + python: + - "3.8" + - "3.9" + - "3.10" + # - "3.11" + + steps: + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Download Python packages + uses: actions/download-artifact@v2 + with: + path: dist + name: dist + + - name: Install wheel + run: pip install dist/*.whl + + - name: Import the package + run: python -c "import jaxsim" From 98384e9db6c2348c70ed0954b7f92ed152ab2648 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Tue, 4 Oct 2022 17:32:54 +0200 Subject: [PATCH 3/5] Pin temporarily also jaxlib --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 3f3b07efd..a4540f98a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,7 +58,7 @@ install_requires = distrax flax jax >=0.3.14, <0.3.16 - jaxlib + jaxlib == 0.3.15 jaxlie jax_dataclasses >= 1.2.2, < 1.4.0 pptree From df2006776932ac7d6bfa5e399bd697f13469d411 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Tue, 4 Oct 2022 17:38:15 +0200 Subject: [PATCH 4/5] Fix wildcard usage on windows jobs --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index eb3bd46bd..090803c9e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -75,6 +75,7 @@ jobs: name: dist - name: Install wheel + shell: bash run: pip install dist/*.whl - name: Import the package From 1fe9985c778e8c35a1e1acacd452cea066701c51 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Tue, 4 Oct 2022 17:44:44 +0200 Subject: [PATCH 5/5] Disable windows since no jaxlib version is on PyPI yet --- .github/workflows/ci_cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 090803c9e..354892335 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -54,7 +54,8 @@ jobs: os: - ubuntu-22.04 - macos-latest - - windows-latest + # https://github.com/google/jax/issues/5795 + # - windows-latest python: - "3.8" - "3.9"