forked from nanoporetech/scrappie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
91 lines (76 loc) · 2.16 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
# Yaml CI config for Gitlab See. http://docs.gitlab.com/ce/ci/yaml/README.html
# Machine image on which to build, test etc
image: ${IMAGE_HOST}/algorithm/scrappie_docker:14.04-latest
variables:
REPO_DEVELOPMENT: "trusty-unstable"
REPO_STAGING: "trusty-testing"
REPO_PRODUCTION: "trusty-stable"
CI_VERSION_PATCH: $CI_BUILD_ID
BUILD_DIR: "build"
stages:
- build
- test
- publish
building:
stage: build
script:
- mkdir ${BUILD_DIR} && (cd ${BUILD_DIR} && cmake .. && make && make package)
except:
# Don't test tags (just branches)
#- tags
artifacts:
paths:
- ${BUILD_DIR}/*.deb
- ${BUILD_DIR}/scrappie
- ${BUILD_DIR}/scrappie_unittest
- ${BUILD_DIR}/libscrappie.so
- ${BUILD_DIR}/libscrappie.a
- ${BUILD_DIR}/Makefile
- ${BUILD_DIR}/CTestTestfile.cmake
- ${BUILD_DIR}/CMakeFiles/scrappie_test.dir/
build-manylinux:
stage: build
image: docker-registry.oxfordnanolabs.local:5000/ont-base-docker
script:
- docker run --rm -v `pwd`:/io ontresearch/manylinux1_x86_64_openblas /io/python/build-wheels.sh
artifacts:
paths:
- python/wheelhouse/scrappie*.whl
testing:
stage: test
script:
- cd ${BUILD_DIR} && make test
artifacts:
when: always
paths:
- ${BUILD_DIR}/Testing
upload-development:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_DEVELOPMENT
only:
- dev
upload-staging:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_STAGING
only:
- master
upload-prod:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_PRODUCTION
only:
- /^release-\d+\.\d+(?:.\d+)?(?:-\d+)?$/ # use regexp