Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add continuous integration workflow #24

Merged
merged 5 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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