-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ami-iit/feature/continuous_integration
Add continuous integration workflow
- Loading branch information
Showing
3 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters