-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
41 lines (39 loc) · 903 Bytes
/
.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
stages:
- check
- build
check:mypy:
stage: check
image: python:3.8
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIPENV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pipenv"
before_script:
- pip install pipenv
- pipenv sync --dev
script:
- pipenv run mypy --exclude "ml_python/.*" .
cache:
key: python
paths:
- .cache/pip
- .cache/pipenv
build:amd64:
stage: build
image: ${CI_REGISTRY_IMAGE}/builder
before_script:
## Setup ccache (Based on: https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/)
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script:
- mkdir -p BUILD
- cd BUILD
- cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
- make -j4
cache:
key: amd64
paths:
- ccache
artifacts:
paths:
- BUILD/bin