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

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

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

build:
  stage: build
  script:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
21
22
    - mkdir Source/build
    - cd Source/build
Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
23
    - cmake ..
Georg Martin Reinke's avatar
Georg Martin Reinke committed
24
    - make
25
  image: ${DOCKER_IMAGE}
26
27
28
  artifacts:
    paths:
      - Source/build
29
  tags:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
30
31
    - docker

Georg Martin Reinke's avatar
Georg Martin Reinke committed
32
33
34
35
36
37
38
39
40
41
42
43
44
docs:
  stage: docs
  script:
    - mv Source/build/libdpsim.so Documentation/dpsim.so
    - cd Documentation
    - make html
  image: ${DOCKER_IMAGE}
  artifacts:
    paths:
      - Documentation/_build
  tags:
    - docker

45
46
47
test:
  stage: test
  script:
Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
48
    - mv Source/build/libdpsim.so Source/Tests/dpsim.so
49
50
51
52
53
    - cd Source/Tests
    - python3 run_tests.py
  image: ${DOCKER_IMAGE}
  tags:
    - docker