Fix CI #84
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
# Main CI | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.7 🐍 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: install flake8 | |
run: pip install flake8 | |
- name: lint | |
run: flake8 --show-source --statistics --max-line-length=127 | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: python-libvmi | |
- name: Install Libvmi | |
uses: ./python-libvmi/.github/actions/libvmi-setup | |
- name: Set up Python 🐍 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: install python-libvmi 🔨 | |
run: | | |
pip install . | |
working-directory: python-libvmi | |
- name: smoke test | |
run: python -c 'from libvmi import Libvmi' | |
- name: build sdist and bdist_wheel | |
run: | | |
python -m pip install wheel | |
python setup.py sdist | |
python setup.py bdist_wheel | |
working-directory: python-libvmi | |
- name: upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.python }} | |
path: "python-libvmi/dist/*.whl" | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
container: quay.io/pypa/manylinux_2_28_x86_64 | |
strategy: | |
matrix: | |
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: python-libvmi | |
- name: Install Libvmi | |
uses: ./python-libvmi/.github/actions/libvmi-setup | |
# download artifact in current directory | |
- name: download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.python }} | |
- name: Repair Wheels | |
run: | | |
for whl in *.whl; do | |
auditwheel repair "$whl" -w manylinux | |
done | |
- name: Publish on PyPI 🚀 | |
uses: pypa/gh-action-pypi-publish@v1.5.0 | |
with: | |
user: __token__ | |
password: ${{ secrets.ACCESS_TOKEN }} | |
packages_dir: manylinux | |
if: startsWith(github.ref, 'refs/tags/v') |