.gitlab-ci.yml 1.38 KB
Newer Older
1
variables:
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
2
  DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
3
  RSYNC_OPTS: --recursive --ignore-missing-args --chown ${DEPLOY_USER}:${DEPLOY_USER}
Markus Mirz's avatar
Markus Mirz committed
4
  DOCKER_IMAGE_DEV: dpsim-dev
5
  GIT_SUBMODULE_STRATEGY: recursive
6

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

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

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

34
35
build:docs:
  stage: build
Georg Martin Reinke's avatar
Georg Martin Reinke committed
36
  script:
Steffen Vogel's avatar
Steffen Vogel committed
37
    - mkdir build
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
49
50

deploy:docs:
Markus Mirz's avatar
Markus Mirz committed
51
52
  stage: deploy
  script:
53
    - ssh ${DEPLOY_USER}@${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}/doc/${CI_BUILD_REF_NAME}/{sphinx,doxygen}
54
55
    - rsync ${RSYNC_OPTS} build/Documentation/html/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/doc/$CI_BUILD_REF_NAME/sphinx
    - rsync ${RSYNC_OPTS} build/Documentation/Cxx/html/ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}/doc/$CI_BUILD_REF_NAME/doxygen
56
57
58
59
60
61
62
63
  dependencies:
    - build:docs
  only:
    - tags
    - master
    - development
  tags:
    - fein-deploy
Markus Mirz's avatar
Markus Mirz committed
64
65
  tags:
    - shell