.gitlab-ci.yml 1.06 KB
Newer Older
1
2
variables:
  DOCKER_IMAGE: dpsim-dev-${CI_COMMIT_REF_NAME}
3
  GIT_SUBMODULE_STRATEGY: recursive
4

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

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

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

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

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