.gitlab-ci.yml 2.26 KB
Newer Older
1 2 3 4
# Dependencies are managed in the Dockerfile in the inkscape-ci-docker
# Git repository. Change them there, wait a bit, and then we'll use
# the new ones here in these builds.
image: registry.gitlab.com/inkscape/inkscape-ci-docker/master
Marc Jeanmougin's avatar
Marc Jeanmougin committed
5

6 7 8 9
cache:
  paths:
    - ccache/

Marc Jeanmougin's avatar
Marc Jeanmougin committed
10
# Building inkscape
11
inkscape:linux:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
12
  stage: build
Tim Sheridan's avatar
Tim Sheridan committed
13 14 15 16 17
  before_script:
    # CCache Config
    - mkdir -p ccache
    - export CCACHE_BASEDIR=${PWD}
    - export CCACHE_DIR=${PWD}/ccache
Ted Gould's avatar
Ted Gould committed
18
  script:
19
    - mkdir -p build
Marc Jeanmougin's avatar
Marc Jeanmougin committed
20
    - cd build
Ted Gould's avatar
Ted Gould committed
21
    - cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug
22
    - make -j3
Marc Jeanmougin's avatar
Marc Jeanmougin committed
23
    - cd ..
Marc Jeanmougin's avatar
Marc Jeanmougin committed
24
  artifacts:
25
    expire_in: 1 year
Marc Jeanmougin's avatar
Marc Jeanmougin committed
26
    paths:
27
      - build/
Marc Jeanmougin's avatar
Marc Jeanmougin committed
28

Tim Sheridan's avatar
Tim Sheridan committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
inkscape:mac:
  stage: build
  tags:
    - mac
  before_script:
    - brew update
    - brew upgrade
    # Tools
    - brew install cmake intltool libtool pkg-config ccache
    # Libraries
    - brew install bdw-gc boost gdl gettext gsl gtkmm3 libcdr libvisio libwpg pango popt poppler potrace
    # Testing tools
    # TODO
    # Cleanup
    - brew cleanup
    # CCache Config
    - mkdir -p ccache
    - export CCACHE_BASEDIR=${PWD}
    - export CCACHE_DIR=${PWD}/ccache
  script:
    - mkdir -p build
    - cd build
    - cmake .. -DIntl_INCLUDE_DIR=/usr/local/opt/gettext/include -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug
    - make -j1
    - cd ..
  artifacts:
    expire_in: 1 year
    paths:
      - build/
58
  allow_failure: true
59

Marc Jeanmougin's avatar
Marc Jeanmougin committed
60 61 62
# This job is a static analysis build by clang.
# It takes MORE THAN 3 HOURS, and depending on worker sometimes 4 hours.
# Make sure the timeout of the build is big enough
63
clang:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
64
  stage: build
Marc Jeanmougin's avatar
Marc Jeanmougin committed
65 66
  only: 
    - schedules
67
  script:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
68
    - apt-get update -yqq && apt-get install -y clang-3.8 clang
69 70
    - mkdir -p clang-build
    - cd clang-build
Marc Jeanmougin's avatar
Marc Jeanmougin committed
71
    - scan-build cmake .. -DCMAKE_BUILD_TYPE=Debug
Marc Jeanmougin's avatar
Marc Jeanmougin committed
72
    - VERBOSE=1 scan-build -o ../scan make -j2
73
  artifacts:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
74 75
    paths:
      - scan/
Marc Jeanmougin's avatar
Marc Jeanmougin committed
76

77
test:linux:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
78
  stage: test
79 80
  dependencies:
    - inkscape:linux
Marc Jeanmougin's avatar
Marc Jeanmougin committed
81
  script:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
82
    - cd build
Marc Jeanmougin's avatar
Marc Jeanmougin committed
83
    - make test
84

Marc Jeanmougin's avatar
Marc Jeanmougin committed
85
# uploads the clang scan to user.gitlab.io/inkscape/
86 87
pages:
  stage: deploy
Marc Jeanmougin's avatar
Marc Jeanmougin committed
88
  when: manual
89 90 91
  dependencies:
    - clang
  script:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
92
    - if test -e scan; then cp -r scan/* public; fi
93 94
  artifacts:
    paths:
Marc Jeanmougin's avatar
Marc Jeanmougin committed
95
      - public
Marc Jeanmougin's avatar
Marc Jeanmougin committed
96 97
  only:
    - master