.gitlab-ci.yml 1.09 KB
Newer Older
1
2
variables:
  DOCKER_IMAGE: dpsim-dev-${CI_COMMIT_REF_NAME}
3
  GIT_SUBMODULE_STRATEGY: recursive
4
  LD_LIBRARY_PATH: /usr/local/lib
5

6
7
stages:
  - prepare
Georg Martin Reinke's avatar
Georg Martin Reinke committed
8
  - build-cim
9
  - build
Georg Martin Reinke's avatar
Georg Martin Reinke committed
10
  - test
11
12
13
14

docker:
  stage: prepare
  script:
15
    - docker build -t ${DOCKER_IMAGE} .
16
17
18
  tags:
    - shell

Georg Martin Reinke's avatar
Georg Martin Reinke committed
19
20
21
22
build-cim:
  stage: build-cim
  script:
    - mkdir -p Source/CIM-XML-Parser/build
23
    - sed -i '/^add_library/ s/STATIC/SHARED/' Source/CIM-XML-Parser/thirdparty/arabica/CMakeLists.txt
Georg Martin Reinke's avatar
Georg Martin Reinke committed
24
25
26
27
    - cd Source/CIM-XML-Parser/build
    - cmake -DBUILD_SHARED_LIBS=ON ..
    - make
  image: ${DOCKER_IMAGE}
28
29
30
  artifacts:
    paths:
    - Source/CIM-XML-Parser/build
Georg Martin Reinke's avatar
Georg Martin Reinke committed
31
32
33
  tags:
    - docker

34
35
36
build:
  stage: build
  script:
37
    - cp Source/CIM-XML-Parser/build/{libCIMParser.so,thirdparty/arabica/libarabica.so} /usr/local/lib
38
    - make -C Source
39
  image: ${DOCKER_IMAGE}
40
  tags:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
41
42
43
44
45
    - docker

test:
  stage: test
  script:
46
    - cp Source/CIM-XML-Parser/build/{libCIMParser.so,thirdparty/arabica/libarabica.so} /usr/local/lib
Georg Martin Reinke's avatar
Georg Martin Reinke committed
47
    - make -C Source tests
Georg Martin Reinke's avatar
Georg Martin Reinke committed
48
    - cd Source/Tests
Georg Martin Reinke's avatar
Georg Martin Reinke committed
49
    - python3 run_tests.py
50
  image: ${DOCKER_IMAGE}
Georg Martin Reinke's avatar
Georg Martin Reinke committed
51
52
  tags:
    - docker