.gitlab-ci.yml 2.5 KB
Newer Older
1 2 3 4
stages:
  - build
  - deploy

5 6 7
.variables_template: &variables_definition
  variables:
    BASE_NAME: "moony.lv2"
8
    PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
9 10
    TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake"

11
.common_template: &common_definition
12
  <<: *variables_definition
13 14
  stage: build
  artifacts:
15
    name: "${BASE_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
16
    paths:
17
      - "${BASE_NAME}-$(cat VERSION)/"
18

19
.build_template: &build_definition
20
  <<: *common_definition
21 22 23
  script:
    - mkdir build
    - pushd build
Hanspeter Portner's avatar
Hanspeter Portner committed
24
    - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=0 -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR} -DPLUGIN_DEST="${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}/${BASE_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ..
25 26 27
    - cmake .. # needed for darwin
    - make
    - make install
28

29
.test_template: &test_definition
30
  <<: *common_definition
31
  script:
32 33
    - mkdir build
    - pushd build
Hanspeter Portner's avatar
Hanspeter Portner committed
34
    - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR} -DPLUGIN_DEST="${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}/${BASE_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ..
35 36 37
    - cmake .. # needed for darwin
    - make
    - make install
38
    - ARGS='-VV' make test
39

40 41 42
.universal_linux_template: &universal_linux_definition
  image: ventosus/universal-linux-gnu
  <<: *test_definition
43

44 45
.arm_linux_template: &arm_linux_definition
  image: ventosus/arm-linux-gnueabihf
46
  <<: *test_definition
47

48 49 50
.universal_w64_template: &universal_w64_definition
  image: ventosus/universal-w64-mingw32
  <<: *test_definition
51

52 53 54
.universal_apple_template: &universal_apple_definition
  image: ventosus/universal-apple-darwin
  <<: *build_definition
55

56 57 58
# building in docker
x86_64-linux-gnu:
  <<: *universal_linux_definition
59

60 61
i686-linux-gnu:
  <<: *universal_linux_definition
62

63 64
arm-linux-gnueabihf:
  <<: *arm_linux_definition
65

66 67
x86_64-w64-mingw32:
  <<: *universal_w64_definition
68

69 70
i686-w64-mingw32:
  <<: *universal_w64_definition
71

72 73
universal-apple-darwin:
  <<: *universal_apple_definition
74

75
pack:
76
  <<: *variables_definition
77 78 79 80
  stage: deploy
  script:
    - echo 'packing up...'
  artifacts:
81
    name: "${BASE_NAME}-$(cat VERSION)"
82
    paths:
83
      - "${BASE_NAME}-$(cat VERSION)/"
84 85

pages:
86
  <<: *variables_definition
87 88 89
  stage: deploy
  script:
    - mkdir -p public
90 91
    - cp "${BASE_NAME}-$(cat VERSION)/x86_64-linux-gnu/${BASE_NAME}/manual.html" public/index.html
    - cp logo/moony_logo.png public/.
92 93 94
  artifacts:
    paths:
      - public/