.gitlab-ci.yml 1.9 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 17
        #- pip3 install pre-commit
        #- alias python=python3
S
up  
superjomn 已提交
18
        - rm -rf ~/.pip
S
up  
superjomn 已提交
19
        - pip install pre-commit
S
update  
superjomn 已提交
20
        - pre-commit install
S
update  
superjomn 已提交
21
        - ./paddle/fluid/lite/tools/build.sh check_style
S
up  
superjomn 已提交
22
        #- ./paddle/fluid/lite/tools/build.sh check_need_ci
S
superjomn 已提交
23 24 25 26
    cache:
        key: check_style
        paths:
            - /root/.cache
S
superjomn 已提交
27 28

build:server:
S
fix ci  
superjomn 已提交
29 30
    tags:
        - lite
S
up  
superjomn 已提交
31
    image: $SERVER_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
32
    stage: build_server
S
up  
superjomn 已提交
33 34 35 36
    cache:
        key: server_thirdparty
        paths:
            - build/third_party
S
update  
superjomn 已提交
37
            - /root/.ccache
S
up  
superjomn 已提交
38
    script:
S
update  
superjomn 已提交
39
        - apt install ccache
S
update  
superjomn 已提交
40 41 42 43
        - export http_proxy=http://172.19.57.45:3128
        - export https_proxy=http://172.19.57.45:3128
        #- export http_proxy=http://agent.baidu.com:8118
        #- export https_proxy=http://agent.baidu.com:8118
S
up  
superjomn 已提交
44 45 46 47 48
        - mkdir -p build
        - cd build
        - ../paddle/fluid/lite/tools/build.sh cmake_x86
        - make extern_eigen3
        - make extern_boost
S
up  
superjomn 已提交
49 50
        - make framework_proto
        - make extern_warpctc
S
up  
superjomn 已提交
51 52 53
        - 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 已提交
54 55 56
    dependencies:
        - check:prebuilt

S
superjomn 已提交
57
build:mobile:
S
fix ci  
superjomn 已提交
58 59
    tags:
        - lite
S
up  
superjomn 已提交
60
    stage: build_mobile
S
superjomn 已提交
61
    image: $MOBILE_LITE_DOCKER_IMAGE
S
up  
superjomn 已提交
62 63 64 65 66
    cache:
        key: mobile_thirdparty
        paths:
            - $MOBILE_LITE_CACHE0
            - $MOBILE_LITE_CACHE1
S
update  
superjomn 已提交
67
            - /root/.ccache
S
superjomn 已提交
68
    script:
S
update  
superjomn 已提交
69
        - apt install ccache
S
up  
superjomn 已提交
70 71
        - export http_proxy=http://172.19.57.45:3128
        - export https_proxy=http://172.19.57.45:3128
S
superjomn 已提交
72
        - ./paddle/fluid/lite/tools/build.sh build_test_arm
S
up  
superjomn 已提交
73 74
    dependencies:
        - build:server