Bump actions/setup-python from 4 to 5 #44
Workflow file for this run
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
name: Python Test and Package | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
submodules: true | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build twine | |
- name: build package | |
run: | | |
python -m build --sdist . | |
- name: twine test | |
run: | | |
python -m twine check dist/* | |
- name: Upload package | |
uses: actions/upload-artifact@v1 | |
with: | |
name: python-packages | |
path: dist | |
- name: List | |
run: | | |
ls -la dist | |
build: | |
needs: package | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ['3.8', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
id: download | |
with: | |
name: python-packages | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tools | |
run: | | |
python -m pip install --upgrade pip | |
- name: Build and Install SimpleITK Package | |
run: | | |
python -m pip install ${{steps.download.outputs.download-path}}/SimpleITK-*.tar.gz |