Repository navigation
83 lines (68 loc) · 2 KB
/
Copy pathci.yml
File metadata and controls
83 lines (68 loc) · 2 KB
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
# Main CI
name: CI
on:
push:
branches:
- master
tags:
- '*'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7 🐍
uses: actions/setup-python@v1
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.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
with:
path: python-libvmi
- name: Set up Python 🐍
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: install dependencies
run: sudo apt-get install -qq cmake bison flex check libjson-c-dev libglib2.0-dev libxenstore3.0 libxen-dev libvirt-dev
- name: clone libvmi
uses: actions/checkout@v2
with:
repository: libvmi/libvmi
path: libvmi
- name: install libvmi
run: |
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build build
sudo cmake --build build --target install
working-directory: libvmi
- 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: publish on PyPI 🚀
# push on master and tag is 'v*'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__
password: ${{ secrets.ACCESS_TOKEN }}
packages_dir: python-libvmi/dist/