-
Notifications
You must be signed in to change notification settings - Fork 31
/
.gitlab-ci.yml
71 lines (64 loc) · 1.94 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
stages:
- base
- build_and_test
- tag
variables:
BASE_IMAGE: bmxnet2-base/build.ubuntu_cpu
BASE_TEMPORARY_IMAGE: bmxnet2-base/build.ubuntu_cpu:$CI_COMMIT_REF_SLUG
BASE_LATEST_IMAGE: bmxnet2-base/build.ubuntu_cpu:latest
build_base_image:
stage: base
image: docker:stable
before_script:
- docker info
script:
- cd ci
- docker build -f docker/Dockerfile.build.ubuntu_cpu --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 --cache-from $BASE_IMAGE --cache-from $BASE_TEMPORARY_IMAGE -t $BASE_TEMPORARY_IMAGE docker
before_script:
- sed -i "s#https://github.com/hpi-xnor/BMXNet-v2-examples#$TESTING_SUBMODULE_URL#g" .gitmodules
- git --version
- git submodule sync --recursive
- git submodule update --init --recursive
- ls && pwd
- export PYTHONPATH=./python/
- export MXNET_MKLDNN_DEBUG=1 # Ignored if not present
- export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
- python3 --version
- pip3 install pytest --upgrade
- pip3 freeze
#make:
# stage: build_and_test
# image: $BASE_TEMPORARY_IMAGE
# script:
# - make DEV=1 USE_CPP_PACKAGE=1 USE_BLAS=openblas USE_DIST_KVSTORE=1 -j$(nproc)
# - python3 -m pytest tests/python/unittest/test_binary.py
cmake_32bit:
stage: build_and_test
image: $BASE_TEMPORARY_IMAGE
script:
- mkdir build
- cd build
- cmake -DBINARY_WORD_TYPE=uint32 -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=OFF -GNinja ..
- cd ..
- cmake --build build
- python3 -m pytest tests/binary
#cmake_64bit:
# stage: build_and_test
# image: $BASE_TEMPORARY_IMAGE
# script:
# - mkdir build
# - cd build
# - cmake -DBINARY_WORD_TYPE=uint64 -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=OFF -GNinja ..
# - cd ..
# - cmake --build build
# - python3 -m pytest tests/binary
tag_image:
stage: tag
image: docker:stable
before_script:
- docker info
script:
- docker tag $BASE_TEMPORARY_IMAGE $BASE_LATEST_IMAGE
- docker image rm $BASE_TEMPORARY_IMAGE
only:
- master