.gitlab-ci.yml 1.94 KB
Newer Older
Jan Dinkelbach's avatar
Jan Dinkelbach committed
1
2
variables:
    DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
Jan Dinkelbach's avatar
Jan Dinkelbach committed
3
    DOCKER_IMAGE_DEV: cimpy
4

Jan Dinkelbach's avatar
Jan Dinkelbach committed
5
6
stages:
- prepare
Philipp Reuber's avatar
Philipp Reuber committed
7
- test
Jan Dinkelbach's avatar
Jan Dinkelbach committed
8
- generate
9
- deploy
10

Jan Dinkelbach's avatar
Jan Dinkelbach committed
11
12
13
14
15
16
17
18
19

docker:
    stage: prepare
    script:
        - docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
    tags:
        - shell
        - linux

20
21
22
23
24
25
26
27
28
29
30
31
32
cached-documentation:
    stage: generate
    script:
        - cd documentation && ./docu.sh
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker
    cache:
        key: secret-cimpy
        paths:
            - documentation
    except:
        - master
Jan Dinkelbach's avatar
Jan Dinkelbach committed
33
34
35
36

documentation:
    stage: generate
    script:
37
        - cd documentation && ./docu.sh
Jan Dinkelbach's avatar
Jan Dinkelbach committed
38
39
40
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    artifacts:
        paths:
Jan Dinkelbach's avatar
fix CI    
Jan Dinkelbach committed
41
            - documentation
Jan Dinkelbach's avatar
Jan Dinkelbach committed
42
43
    tags:
        - docker
44
45
    only:
        - master
Philipp Reuber's avatar
Philipp Reuber committed
46

47

Philipp Reuber's avatar
Philipp Reuber committed
48
pages:
Philipp Reuber's avatar
Philipp Reuber committed
49
50
51
    stage: deploy
    script:
        - mkdir .public
Philipp Reuber's avatar
Philipp Reuber committed
52
        - cp -r documentation/_build/html/. .public
Philipp Reuber's avatar
Philipp Reuber committed
53
54
55
56
        - mv .public public
    artifacts:
        paths:
            - public
Philipp Reuber's avatar
Philipp Reuber committed
57
            - .public
Philipp Reuber's avatar
Philipp Reuber committed
58
59
    dependencies:
        - documentation
60
61
    only:
        - master
Philipp Reuber's avatar
Philipp Reuber committed
62

63
64


65
test:import:
66
    stage: test
67
68
69
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
70
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
71
        - cd tests && pytest -v test_import.py
72
73
74
75
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker

Jan Dinkelbach's avatar
Jan Dinkelbach committed
76
test:export-against-imported-files:
77
    stage: test
78
79
80
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
81
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
82
        - cd tests && pytest -v test_export_with_imported_files.py
83
84
85
86
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker

Jan Dinkelbach's avatar
Jan Dinkelbach committed
87
test:export-against-exported-files:
88
    stage: test
Philipp Reuber's avatar
Philipp Reuber committed
89
90
91
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
92
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
93
        - cd tests && pytest -v test_export_with_exported_files.py
Philipp Reuber's avatar
Philipp Reuber committed
94
95
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
96
        - docker