This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
102 lines (90 loc) · 3.12 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
#image: pypy:latest
image: registry.gitlab.com/kolanich/fixed_python:latest
stages:
- dependencies
- build
- test
- tooling
variables:
GIT_DEPTH: "1"
PYTHONUSERBASE: ${CI_PROJECT_DIR}/python_user_packages
dependencies:
tags:
- shared
stage: dependencies
before_script:
- export PYTHON_MODULES_DIR=${PYTHONUSERBASE}/lib/python3.7/site-packages
- export EXECUTABLE_DEPENDENCIES_DIR=${PYTHONUSERBASE}/bin
- export PATH="$PATH:$EXECUTABLE_DEPENDENCIES_DIR" # don't move into `variables` any of them, it is unordered
#- python -c "import hyperband"
script:
- mkdir -p $EXECUTABLE_DEPENDENCIES_DIR $PYTHON_MODULES_DIR
- source ./.ci/installBackendsDependencies.sh
cache:
key: deps
paths:
- $PYTHONUSERBASE
- $EXECUTABLE_DEPENDENCIES_DIR
build:
tags:
- shared
stage: build
before_script:
- export PYTHON_MODULES_DIR=${PYTHONUSERBASE}/lib/python3.7
- export EXECUTABLE_DEPENDENCIES_DIR=${PYTHONUSERBASE}/bin
- export PATH="$PATH:$EXECUTABLE_DEPENDENCIES_DIR" # don't move into `variables` any of them, it is unordered
- source ./.ci/installBackendsDependencies.sh # everything should be built at this moment, needed only to install the stuff installed by apt-get
script:
- python3 setup.py bdist_wheel
- mv ./dist/*.whl ./dist/UniOpt-0.CI-py3-none-any.whl
- pip3 install --user --upgrade --pre -e ./[hyperopt,hyperengine,SKOpt,SMAC,BeeColony,optunity,Yabox,PySHAC,RBFOpt,Bayessian,GPyOpt,SOpt,pySOT,BayTune,RoBo] #https://github.com/pypa/pip/issues/5903
- coverage run --source=UniOpt -m pytest --junitxml=./rspec.xml ./tests/tests.py
- coverage report -m
- coverage xml
cache:
key: deps
paths:
- $PYTHONUSERBASE
artifacts:
paths:
- dist
reports:
junit: ./rspec.xml
cobertura: ./coverage.xml
checks:
stage: tooling
tags:
- shared
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:dind
script:
- docker run --env SAST_CONFIDENCE_LEVEL=5 --volume "$PWD:/code" --volume /var/run/docker.sock:/var/run/docker.sock "registry.gitlab.com/gitlab-org/security-products/sast:latest" /app/bin/run /code
#- docker run --env SOURCE_CODE="$PWD" --env CODECLIMATE_VERSION="latest" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock "registry.gitlab.com/gitlab-org/security-products/codequality:latest" /code
#- docker run --env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}" --volume "$PWD:/code" --volume /var/run/docker.sock:/var/run/docker.sock "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:latest" /code
artifacts:
reports:
#codequality: gl-code-quality-report.json
sast: gl-sast-report.json
#dependency_scanning: gl-dependency-scanning-report.json
pages:
stage: tooling
tags:
- shared
image: alpine:latest
allow_failure: true
before_script:
- apk update
- apk add doxygen
- apk add ttf-freefont graphviz
script:
- doxygen ./Doxyfile
- mv ./docs/html ./public
artifacts:
paths:
- public
only:
- master