-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
134 lines (116 loc) · 3.54 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
131
132
133
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
PYTHONUNBUFFERED: "1"
cache:
key: "python-pip"
paths:
- $PIP_CACHE_DIR
.postgres_install: &postgres_install
- apt install -y postgresql postgresql-contrib
- export MYDB="skitai:12345678@localhost/skitai"
- service postgresql start
- su - postgres -c "psql -c \"drop database if exists skitai;\""
- su - postgres -c "psql -c \"create database skitai;\""
- su - postgres -c "psql -c \"create user skitai with encrypted password '12345678';\""
- su - postgres -c "psql -c \"grant all privileges on database skitai to skitai;\""
- cd tools/benchmark
- python3 bench/manage.py migrate
- python3 bench/init_db.py
- cd ../..
.base_install: &base_install
- adduser --disabled-password --shell /bin/bash --gecos "ubuntu" ubuntu
- apt update
- python -V
- pip install -U setuptools pip wheel
- pip install -Ur tools/benchmark/requirements.txt
- pip install -Ur tests/requirements.txt
- pip install -U --pre --no-cache-dir delune atila-vue
.post_install: &post_install
- pip install -U --pre --no-cache-dir sqlphile
- git clone https://gitlab.com/skitai/rs4.git && cd rs4 && pip install --force -e . && cd ..
- pip install -e .
- git clone https://gitlab.com/skitai/atila.git && cd atila && pip install --force -e . && cd ..
- python -c 'from rs4.protocols.sock.impl.grpc import discover'
.before_python_notf_test: &before_python_notf_test
before_script:
- *base_install
- *postgres_install
- pip install -U grpcio
- *post_install
.before_python_tf23_test: &before_python_tf23_test
before_script:
- *base_install
- *postgres_install
- apt install -y libgl1-mesa-glx
- pip install -U grpcio tensorflow-cpu==2.3.4 keras==2.3.1
- pip install -U --pre --no-cache-dir tfserver dnn
- *post_install
.before_python_tf25_test: &before_python_tf25_test
before_script:
- *base_install
- *postgres_install
- apt install -y libgl1-mesa-glx
- pip install -U grpcio tensorflow-cpu==2.5.3 keras==2.4.3
- pip install -U --pre --no-cache-dir tfserver dnn
- *post_install
.before_python_tf28_test: &before_python_tf28_test
before_script:
- *base_install
- *postgres_install
- apt install -y libgl1-mesa-glx
- pip install -U grpcio tensorflow-cpu==2.8.4 keras==2.8.0 "numpy<1.24"
- pip install -U --pre --no-cache-dir tfserver dnn
- *post_install
.before_pypy_test: &before_pypy_test
before_script:
- rm /usr/bin/python && ln -s /usr/local/bin/pypy3 /usr/bin/python
- *base_install
- *post_install
.test_template: &test_template
script:
- cd tests
- chown -R ubuntu:ubuntu . && su ubuntu
- ./test-all.sh --disable-pytest-warnings
python 3.6:
image: python:3.6-buster
<<: *before_python_tf23_test
<<: *test_template
only:
- master
python 3.7:
image: python:3.7-buster
<<: *before_python_tf23_test
<<: *test_template
only:
- master
python 3.8:
image: python:3.8-buster
<<: *before_python_tf23_test
<<: *test_template
only:
- master
python 3.9:
image: python:3.9-buster
<<: *before_python_tf25_test
<<: *test_template
only:
- test
python 3.10:
image: python:3.10-buster
<<: *before_python_tf28_test
<<: *test_template
only:
- master
python 3.11:
image: python:3.11-buster
<<: *before_python_notf_test
<<: *test_template
only:
- py311
python pypy3:
image: pypy:3
<<: *before_pypy_test
<<: *test_template
only:
- pypy