.gitlab-ci.yml 2.3 KB
Newer Older
S
superjomn 已提交
1 2 3 4 5 6 7
before_script:
  - env

image: $SERVER_LITE_DOCKER_IMAGE

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

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

        # 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 已提交
26
        - ./paddle/fluid/lite/tools/build.sh check_style
S
superjomn 已提交
27 28 29 30
    cache:
        key: check_style
        paths:
            - /root/.cache
S
superjomn 已提交
31 32

build:server:
S
fix ci  
superjomn 已提交
33 34
    tags:
        - lite
S
up  
superjomn 已提交
35
    image: $SERVER_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
36
    stage: build_server
S
up  
superjomn 已提交
37 38 39 40
    cache:
        key: server_thirdparty
        paths:
            - build/third_party
S
update  
superjomn 已提交
41
            - /root/.ccache
S
up  
superjomn 已提交
42
    script:
S
update  
superjomn 已提交
43
        - apt install ccache
C
Chunwei 已提交
44 45 46 47 48 49 50 51 52
        - 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 已提交
53 54 55 56 57
        - mkdir -p build
        - cd build
        - ../paddle/fluid/lite/tools/build.sh cmake_x86
        - make extern_eigen3
        - make extern_boost
S
up  
superjomn 已提交
58 59
        - make framework_proto
        - make extern_warpctc
S
up  
superjomn 已提交
60 61 62
        - 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 已提交
63 64 65
    dependencies:
        - check:prebuilt

S
superjomn 已提交
66
build:mobile:
S
fix ci  
superjomn 已提交
67 68
    tags:
        - lite
S
up  
superjomn 已提交
69
    stage: build_mobile
S
superjomn 已提交
70
    image: $MOBILE_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
71 72 73 74 75
    cache:
        key: mobile_thirdparty
        paths:
            - $MOBILE_LITE_CACHE0
            - $MOBILE_LITE_CACHE1
S
update  
superjomn 已提交
76
            - /root/.ccache
S
superjomn 已提交
77
    script:
S
update  
superjomn 已提交
78
        - apt install ccache
C
Chunwei 已提交
79 80 81 82 83 84 85 86 87
        - 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 已提交
88
        - ./paddle/fluid/lite/tools/build.sh build_test_arm
S
up  
superjomn 已提交
89 90
    dependencies:
        - build:server