Refactor CI/CD system based on latest standardization for upstreams (… #90
Workflow file for this run
This file contains hidden or 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: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Build the package | |
run: | | |
export GUIDELLM_BUILD_TYPE=release | |
tox -e build | |
- name: Upload build artifacts | |
id: artifact-upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-artifacts | |
path: dist/* | |
compression-level: 6 | |
if-no-files-found: error | |
retention-days: 90 | |
- name: Log artifact location | |
run: | | |
echo "Artifacts uploaded to: Artifacts uploaded to: ${{ steps.artifact-upload.outputs.artifact-url }}" | |
- name: Push wheel to PyPI | |
uses: neuralmagic/nm-actions/actions/[email protected] | |
with: | |
username: ${{ secrets.PYPI_PUBLIC_USER }} | |
password: ${{ secrets.PYPI_PUBLIC_AUTH }} | |
whl: $(find dist -name '*.whl') | |
- name: Push tar.gz to PyPI | |
uses: neuralmagic/nm-actions/actions/[email protected] | |
with: | |
username: ${{ secrets.PYPI_PUBLIC_USER }} | |
password: ${{ secrets.PYPI_PUBLIC_AUTH }} | |
whl: $(find dist -name '*.tar.gz') | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run unit tests | |
run: tox -e test-unit | |
integration-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run integration tests | |
run: tox -e test-integration | |
e2e-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run end-to-end tests | |
run: tox -e test-e2e |