-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
71 lines (64 loc) · 2.04 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
# cache key for a ref on each job means that this job will check the cache for
# a directory image keyed on that thing, and if it exists, it will load that before
# executing the script. then it will save the image back under the same key when the job
# succeeds. so we copy-paste it all over
stages:
- prereqs
- build
- test
# obtain / check for dependencies
deps:
stage: prereqs
script:
# check for required apt packages
- dpkg-query -W libstdc++-8-dev libopencv-dev libdispatch0 libdispatch-dev valgrind
# check for required pip packages
- python -c "import lit"
# build other prereqs
- ./xgboost/get.sh
- mkdir build install
- cd build
- ../benchmark/setup.sh
cache:
key: "$CI_PIPELINE_ID"
paths:
- xgboost/root/lib
- xgboost/root/include
- xgboost/root/rabit/include
- xgboost/root/dmlc-core/include
- build
- install
# template for building and testing atjit
.atjit_test:
stage: build
script:
- cd build
- cmake -G "Unix Makefiles" ${CUSTOM_LLVM} -DCMAKE_BUILD_TYPE=${ATJIT_BUILD_TYPE} -DBENCHMARK=ON -DBENCHMARK_DIR=`pwd`/benchmark/install -DATJIT_EXAMPLE=ON -DCMAKE_INSTALL_PREFIX=../install -DPOLLY_KNOBS=OFF ..
- make -j 4
- make install
- make check
dependencies:
- deps
cache:
key: "$CI_PIPELINE_ID"
paths:
- xgboost/root/lib
- xgboost/root/include
- xgboost/root/rabit/include
- xgboost/root/dmlc-core/include
- build
- install
policy: pull # don't push changes to the cache from this job
atjit_release:
variables:
ATJIT_BUILD_TYPE: "Release"
CUSTOM_LLVM: ""
extends: .atjit_test
atjit_debug:
variables:
ATJIT_BUILD_TYPE: "Debug"
CUSTOM_LLVM: ""
extends: .atjit_test
# TODO: implement method to build and test ./get-llvm.sh script.
# I can't recall how to use gitlab's caching stuff to save state between
# stages. Ideally we would just move to Docker to simplify this.