.gitlab-ci.yml 1.1 KB
Newer Older
1
variables:
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
2
  DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
Markus Mirz's avatar
Markus Mirz committed
3
  DOCKER_IMAGE_DEV: dpsim-dev
Markus Mirz's avatar
Markus Mirz committed
4
  DOCKER_IMAGE_WEB: dpsim-web
5
  GIT_SUBMODULE_STRATEGY: recursive
6

7
8
9
stages:
  - prepare
  - build
Georg Martin Reinke's avatar
Georg Martin Reinke committed
10
  - docs
Markus Mirz's avatar
Markus Mirz committed
11
  - deploy
12
13
14
15

docker:
  stage: prepare
  script:
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
16
    - docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
Markus Mirz's avatar
Markus Mirz committed
17
    - docker images
18
  tags:
Markus Mirz's avatar
Markus Mirz committed
19
    - shell
20
21
22
23

build:
  stage: build
  script:
Markus Mirz's avatar
Markus Mirz committed
24
25
    - mkdir build
    - cd build
Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
26
    - cmake ..
Markus Mirz's avatar
Markus Mirz committed
27
    - make -j 8
Markus Mirz's avatar
Markus Mirz committed
28
  image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
29
30
  artifacts:
    paths:
Markus Mirz's avatar
Markus Mirz committed
31
      - build
32
  tags:
Georg Martin Reinke's avatar
Georg Martin Reinke committed
33
34
    - docker

Georg Martin Reinke's avatar
Georg Martin Reinke committed
35
36
37
docs:
  stage: docs
  script:
Markus Mirz's avatar
Markus Mirz committed
38
    - cd build
Markus Mirz's avatar
Markus Mirz committed
39
    - cmake ..
40
    - make docs
Markus Mirz's avatar
Markus Mirz committed
41
    - make docs_cxx
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
42
  image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
Georg Martin Reinke's avatar
Georg Martin Reinke committed
43
44
  artifacts:
    paths:
Markus Mirz's avatar
Markus Mirz committed
45
46
      - build/Documentation/html
      - build/Documentation/Cxx/html
Georg Martin Reinke's avatar
Georg Martin Reinke committed
47
48
  tags:
    - docker
Markus Mirz's avatar
Markus Mirz committed
49
50
51
52
    
deploy:
  stage: deploy
  script:
Markus Mirz's avatar
Markus Mirz committed
53
    - docker build -f Dockerfile.webdoc -t ${DOCKER_IMAGE_WEB}:${DOCKER_TAG_DEV} .
Markus Mirz's avatar
Markus Mirz committed
54
    - docker images
Markus Mirz's avatar
Markus Mirz committed
55
    - docker container stop dpsim-webdoc
Markus Mirz's avatar
Markus Mirz committed
56
    - docker container rm dpsim-webdoc
Markus Mirz's avatar
Markus Mirz committed
57
58
59
    - docker run --name dpsim-webdoc -d -p 8080:80 ${DOCKER_IMAGE_WEB}:${DOCKER_TAG_DEV}
  tags:
    - shell