-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
130 lines (119 loc) · 3.64 KB
/
.gitlab-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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
stages:
- static_analysis
- tests
- installation
- distribution
- post
flake8:
stage: static_analysis
image: python:3.9
script:
- pip install flake8 --quiet
- flake8 --max-line-length=80 expliot
pylint:
stage: static_analysis
image: python:3.9
script:
- pip install pylint --quiet
- pip install -r requirements.txt
- pylint expliot
ubuntu2004:
stage: installation
only:
- master
image: ubuntu:20.04
script:
- DEBIAN_FRONTEND=noninteractive apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libglib2.0-dev libusb-1.0 git python3-dev python3-setuptools build-essential
- git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
- cd expliot-master
- python3 setup.py install
ubuntu_latest:
stage: installation
only:
- master
image: ubuntu:latest
script:
- DEBIAN_FRONTEND=noninteractive apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y libglib2.0-dev libusb-1.0 git python3-dev python3-setuptools build-essential
- git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
- cd expliot-master
- python3 setup.py install
#debian_latest:
# stage: installation
# only:
# - master
# image: debian:latest
# script:
# - echo -e 'deb http://deb.debian.org/debian stretch main\ndeb-src http://deb.debian.org/debian stretch-updates main\ndeb-src http://security.debian.org stretch/updates main' >> /etc/apt/sources.list
# - apt-get update
# - apt-get install -y libglib2.0-dev libusb-1.0 git python3-dev python3-setuptools build-essential
# - git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
# - cd expliot-master
# - python3 setup.py install
debian_sid:
stage: installation
only:
- master
image: debian:sid
script:
- echo -e 'deb http://deb.debian.org/debian unstable main\ndeb-src http://deb.debian.org/debian/ unstable main' >> /etc/apt/sources.list
- apt-get update
- apt-get install -y libglib2.0-dev libusb-1.0 git python3-dev python3-setuptools build-essential
- git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
- cd expliot-master
- python3 setup.py install
fedora_latest:
stage: installation
only:
- master
image: fedora:latest
script:
- dnf -y install redhat-rpm-config libusb glib2-devel python3-devel python3-setuptools git @development-tools
- git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
- cd expliot-master
- python3 setup.py install
fedora_rawhide:
stage: installation
only:
- master
image: fedora:rawhide
script:
- dnf -y install redhat-rpm-config libusb glib2-devel python3-devel python3-setuptools git @development-tools
- git clone --single-branch --branch master https://gitlab.com/expliot_framework/expliot.git expliot-master
- cd expliot-master
- python3 setup.py install
sdist:
stage: distribution
image: python:3.9
only:
- master
script:
- python setup.py sdist
artifacts:
paths:
- dist/
expire_in: 1 week
wheel:
image: python:3.9
stage: distribution
only:
- master
script:
- python setup.py bdist_wheel
artifacts:
paths:
- dist/
expire_in: 1 week
# This requires TWINE_USERNAME and TWINE_PASSWORD to be set
# Settings -> CI/CD -> Variables
pypi:
image: python:3.9
stage: post
cache: {}
script:
- pip install -U twine
- python setup.py sdist
- twine upload dist/*
only:
- tags