.gitlab-ci.yml 1.02 KB
Newer Older
Markus Mirz's avatar
Markus Mirz committed
1
2
image: docker:latest

3
variables:
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
4
  DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
Markus Mirz's avatar
Markus Mirz committed
5
  DOCKER_IMAGE_DEV: dpsim-dev
6
  GIT_SUBMODULE_STRATEGY: recursive
Markus Mirz's avatar
Markus Mirz committed
7
8
9
10
11
12
  DOCKER_DRIVER: overlay2
# When using dind, it's wise to use the overlayfs driver for
# improved performance.

services:
- docker:dind
13

14
15
16
stages:
  - prepare
  - build
Georg Martin Reinke's avatar
Georg Martin Reinke committed
17
  - docs
18
  - test
19
20
21

docker:
  stage: prepare
Markus Mirz's avatar
Markus Mirz committed
22
23
  before_script:
    - docker info
24
  script:
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
25
    - docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
26
  tags:
Markus Mirz's avatar
Markus Mirz committed
27
    - docker
28
29
30
31

build:
  stage: build
  script:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
32
33
    - mkdir Source/build
    - cd Source/build
Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
34
    - cmake ..
Georg Martin Reinke's avatar
Georg Martin Reinke committed
35
    - make
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
36
  image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
37
38
39
  artifacts:
    paths:
      - Source/build
40
  tags:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
41
42
    - docker

Georg Martin Reinke's avatar
Georg Martin Reinke committed
43
44
45
docs:
  stage: docs
  script:
46
    - make docs
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
47
  image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
Georg Martin Reinke's avatar
Georg Martin Reinke committed
48
49
  artifacts:
    paths:
50
      - Documentation/html
Georg Martin Reinke's avatar
Georg Martin Reinke committed
51
52
53
  tags:
    - docker

54
55
test:
  stage: test
56
57
  variables:
    PYTHONPATH: Source/build
58
  script:
59
    - python3 Examples/Python/ci.py
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
60
  image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
61
62
  tags:
    - docker