-
Notifications
You must be signed in to change notification settings - Fork 22
104 lines (84 loc) · 2.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# 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@v5
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@v5
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/[email protected]
with:
user: __token__
password: ${{ secrets.ACCESS_TOKEN }}
packages_dir: manylinux
if: startsWith(github.ref, 'refs/tags/v')