.gitlab-ci.yml 2.41 KB
Newer Older
1
image: flowee/buildenv:debian
Tom Zander's avatar
Tom Zander committed
2 3 4 5 6 7 8

stages:
- build
- test
- deploy

variables:
Tom Zander's avatar
Tom Zander committed
9
  HUB_IMG: flowee/hub
Tom Zander's avatar
Tom Zander committed
10 11 12 13 14 15 16 17 18 19

#####  Debian stable

build-debian-stable:
  stage: build
  script:
    - mkdir build
    - cd build
    - cmake -Dbuild_tests=true -Denable_wallet=true -DCMAKE_BUILD_TYPE=ReleaseWithDebugInfo -DCMAKE_INSTALL_PREFIX=.. ..
    - echo nproc=`nproc`
Tom Zander's avatar
Tom Zander committed
20
    - make univalue leveldb
Tom Zander's avatar
Tom Zander committed
21 22 23 24
    - make -j0`nproc` install
  artifacts:
    paths:
    - bin
Tom Zander's avatar
Tom Zander committed
25
    - build/testing/*/test_*
26
    expire_in: 10 hrs
Tom Zander's avatar
Tom Zander committed
27

28
test_utxo:
Tom Zander's avatar
Tom Zander committed
29
  stage: test
30 31
  script:
    - build/testing/utxo/test_utxo
32 33 34
  dependencies:
  - build-debian-stable

35
test_prevector:
36 37
  stage: test
  script: build/testing/prevector/test_prevector
Tom Zander's avatar
Tom Zander committed
38 39 40
  dependencies:
  - build-debian-stable

41
test_doublespend:
Tom Zander's avatar
Tom Zander committed
42 43 44 45 46
  stage: test
  script: build/testing/doublespend/test_doublespend
  dependencies:
  - build-debian-stable

47
test_streaming:
48 49 50 51 52
  stage: test
  script: build/testing/streaming/test_streaming
  dependencies:
  - build-debian-stable

53
test_protocol:
54 55 56 57 58
  stage: test
  script: build/testing/bitcoin-protocol/test_protocol
  dependencies:
  - build-debian-stable

59 60 61 62 63 64
test_networkmanager:
  stage: test
  script: build/testing/networkmanager/test_networkmanager
  dependencies:
  - build-debian-stable

Tom Zander's avatar
Tom Zander committed
65 66 67 68 69 70
test_hashstorage:
  stage: test
  script: build/testing/hashstorage/test_hashstorage
  dependencies:
  - build-debian-stable

Tom Zander's avatar
Tom Zander committed
71 72 73
#####  Static build (Linux)

build-static:
74
  image: flowee/buildenv:static
Tom Zander's avatar
Tom Zander committed
75 76 77 78 79 80
  stage: build
  script: build_static
  artifacts:
    paths:
    - bin
    - etc/flowee
Tom Zander's avatar
Tom Zander committed
81
    expire_in: 1 hrs
Tom Zander's avatar
Tom Zander committed
82 83 84 85

# how to create a .deb file TODO
# https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/

Tom Zander's avatar
Tom Zander committed
86
flowee-the-hub-linux.zip:
Tom Zander's avatar
Tom Zander committed
87 88 89 90 91 92 93 94 95
  stage: deploy
  script: for i in bin/*; do strip $i; done
  artifacts:
    name: flowee-the-hub-${CI_COMMIT_SHA}
    paths:
    - bin
    - etc
  dependencies:
  - build-static
Tom Zander's avatar
Tom Zander committed
96 97
  only:
    - master
Tom Zander's avatar
Tom Zander committed
98
    - "2019.03"
Tom Zander's avatar
Tom Zander committed
99 100 101 102

createHubDocker:
  stage: deploy
  script:
103
    - docker login -u flowee -p $DOCKER_TOKEN
Tom Zander's avatar
Tom Zander committed
104
    - mv bin support/docker/hub
Tom Zander's avatar
Tom Zander committed
105 106
    - docker build --tag=$HUB_IMG:${CI_COMMIT_REF_NAME} support/docker/hub
    - docker image push $HUB_IMG:${CI_COMMIT_REF_NAME}
Tom Zander's avatar
Tom Zander committed
107 108
  image: docker:latest
  services:
109
    - docker:dind
Tom Zander's avatar
Tom Zander committed
110
  dependencies:
111 112
    - build-static
  allow_failure: true
Tom Zander's avatar
Tom Zander committed
113 114 115 116 117 118 119 120 121

##### Build as standard as it gets.

build-debian-nowallet:
  stage: build
  script:
    - mkdir build
    - cd build
    - cmake -Denable_gui=false ..
Tom Zander's avatar
Tom Zander committed
122
    - make univalue leveldb
Tom Zander's avatar
Tom Zander committed
123 124
    - make -j0`nproc` all