.gitlab-ci.yml 1.51 KB
Newer Older
1
image: registry.gitlab.com/equalitie/ouinet:latest
Dmitriy Volkov's avatar
Dmitriy Volkov committed
2

3
4
5
6
7
stages:
  - build-image
  - build
  - test

Dmitriy Volkov's avatar
Dmitriy Volkov committed
8
9
10
variables:
  GIT_SUBMODULE_STRATEGY: recursive

11
build-image:
12
  stage: build-image
13
14
15
16
  tags:
    - shell
  script:
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
17
    - docker build --pull --target base -t $CI_REGISTRY_IMAGE:latest - < Dockerfile
18
    - docker push $CI_REGISTRY_IMAGE:latest
19
20
    - docker build -t $CI_REGISTRY_IMAGE:android - < Dockerfile.android
    - docker push $CI_REGISTRY_IMAGE:android
Dmitriy Volkov's avatar
Dmitriy Volkov committed
21
22
23
24
25

build:
  stage: build
  tags:
    - docker
Dmitriy Volkov's avatar
Dmitriy Volkov committed
26
27
28
29
  artifacts:
    paths:
      - build/client
      - build/injector
30
      - build/lib*.so
31
      - build/lib*.so.*
Dmitriy Volkov's avatar
Dmitriy Volkov committed
32
33
      - build/test/test-*
    expire_in: 6h
34
35
36
37
38
  cache:
    key: single
    paths:
      - build/modules/*/go-workspace
      - build/src/ouiservice/lampshade/go-workspace
Dmitriy Volkov's avatar
Dmitriy Volkov committed
39
  script:
Dmitriy Volkov's avatar
Dmitriy Volkov committed
40
    - mkdir -p build
Dmitriy Volkov's avatar
Dmitriy Volkov committed
41
42
43
    - cd build
    - cmake ..
    - make -j `nproc`
44

wldhx's avatar
wldhx committed
45
46
47
48
49
50
51
52
53
54
build-android:
  stage: build
  tags:
    - docker
  image: registry.gitlab.com/equalitie/ouinet:android
  script:
    - mkdir -p build.android
    - cd build.android
    - ../scripts/build-android.sh

55
56
57
58
unit-test:
  stage: test
  tags:
    - docker
59
    - ptrace
60
  script:
61
62
    - export LD_LIBRARY_PATH=$PWD/build:/usr/local/lib
    - for test in ./build/test/test-*; do "$test" --log_level=test_suite; done
63
64
65
66
67
68

integration-test:
  stage: test
  tags:
    - docker
  script:
69
    - export LD_LIBRARY_PATH=$PWD/build:/usr/local/lib
70
71
    - export OUINET_BUILD_DIR=$PWD/build
    - ./scripts/run_integration_tests.sh