Skip to content

Commit

Permalink
Merge pull request #24 from ami-iit/feature/continuous_integration
Browse files Browse the repository at this point in the history
Add continuous integration workflow
  • Loading branch information
diegoferigo committed Oct 5, 2022
2 parents 3ec2371 + 1fe9985 commit 255a2fe
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 2 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
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
# https://github.com/google/jax/issues/5795
# - 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
shell: bash
run: pip install dist/*.whl

- name: Import the package
run: python -c "import jaxsim"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 255a2fe

Please sign in to comment.