.gitlab-ci.yml 2.4 KB
Newer Older
S
superjomn 已提交
1 2
before_script:
  - env
C
Chunwei 已提交
3
  - export CI_USER_DIR=$(pwd)
S
superjomn 已提交
4 5 6 7 8

image: $SERVER_LITE_DOCKER_IMAGE

stages:
  - ci
S
up  
superjomn 已提交
9 10
  - build_server
  - build_mobile
S
superjomn 已提交
11 12

check:prebuilt:
S
fix ci  
superjomn 已提交
13 14
    tags:
        - lite
S
up  
superjomn 已提交
15 16
    stage: ci
    script:
S
up  
superjomn 已提交
17
        - rm -rf ~/.pip
C
Chunwei 已提交
18 19
        - export http_proxy=$CI_PROXY
        - export https_proxy=$CI_PROXY
S
up  
superjomn 已提交
20
        - pip install pre-commit
S
update  
superjomn 已提交
21
        - pre-commit install
C
Chunwei 已提交
22 23 24 25 26 27 28

        # merge the latest code
        - git config --global user.email "you@example.com"
        - git config --global user.name "Your Name"
        - git fetch origin incubate/lite
        - git merge --no-ff origin/incubate/lite

S
update  
superjomn 已提交
29
        - ./paddle/fluid/lite/tools/build.sh check_style
S
superjomn 已提交
30 31 32
    cache:
        key: check_style
        paths:
C
Chunwei 已提交
33
            - $CI_USER_DIR/.cache
S
superjomn 已提交
34 35

build:server:
S
fix ci  
superjomn 已提交
36 37
    tags:
        - lite
S
up  
superjomn 已提交
38
    image: $SERVER_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
39
    stage: build_server
S
up  
superjomn 已提交
40 41 42 43
    cache:
        key: server_thirdparty
        paths:
            - build/third_party
C
Chunwei 已提交
44
            - ~/.ccache
S
up  
superjomn 已提交
45
    script:
S
update  
superjomn 已提交
46
        - apt install ccache
C
Chunwei 已提交
47 48 49 50 51 52 53 54 55
        - export http_proxy=$CI_PROXY
        - export https_proxy=$CI_PROXY

        # merge the latest code
        - git config --global user.email "you@example.com"
        - git config --global user.name "Your Name"
        - git fetch origin incubate/lite
        - git merge --no-ff origin/incubate/lite

S
up  
superjomn 已提交
56 57 58 59 60
        - mkdir -p build
        - cd build
        - ../paddle/fluid/lite/tools/build.sh cmake_x86
        - make extern_eigen3
        - make extern_boost
S
up  
superjomn 已提交
61 62
        - make framework_proto
        - make extern_warpctc
S
up  
superjomn 已提交
63 64 65
        - cd ..
        - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/build/third_party/install/mklml/lib
        - ./paddle/fluid/lite/tools/build.sh build_test_server
S
up  
superjomn 已提交
66 67 68
    dependencies:
        - check:prebuilt

S
superjomn 已提交
69
build:mobile:
S
fix ci  
superjomn 已提交
70 71
    tags:
        - lite
S
up  
superjomn 已提交
72
    stage: build_mobile
S
superjomn 已提交
73
    image: $MOBILE_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
74 75 76 77 78
    cache:
        key: mobile_thirdparty
        paths:
            - $MOBILE_LITE_CACHE0
            - $MOBILE_LITE_CACHE1
C
Chunwei 已提交
79
            - ~/.ccache
S
superjomn 已提交
80
    script:
S
update  
superjomn 已提交
81
        - apt install ccache
C
Chunwei 已提交
82 83 84 85 86 87 88 89 90
        - export http_proxy=$CI_PROXY
        - export https_proxy=$CI_PROXY

        # merge the latest code
        - git config --global user.email "you@example.com"
        - git config --global user.name "Your Name"
        - git fetch origin incubate/lite
        - git merge --no-ff origin/incubate/lite

S
superjomn 已提交
91
        - ./paddle/fluid/lite/tools/build.sh build_test_arm
S
up  
superjomn 已提交
92 93
    dependencies:
        - build:server