.gitlab-ci.yml 2.09 KB
Newer Older
Dominik Bongartz's avatar
Dominik Bongartz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
stages:
 - build
 - test
 - deploy


build_windows:
    stage: build
    tags:
        - windows
        - maingo
    variables:
        GIT_STRATEGY: clone
    before_script:
        - git submodule init
        - git submodule update
    script: 
        - mkdir build
        - '$env:path += ";C:\Program Files\cmake\bin"'
        - cmake -B build -G "Visual Studio 15 2017" -A x64 -D MAiNGO_build_test=TRUE -D MAiNGO_build_python_interface=TRUE -D MAiNGO_build_parser=false
        - cd build
        - cmake --build . --config Release -j4
        - cd ..
    artifacts:
        paths:
            - build/Release/
        exclude:
            - build/Release/*.lib
            - build/Release/**/*.exp
            - build/Release/**/*.lib


test_windows:
    stage: test
    needs: [build_windows]
    tags:
        - windows
        - maingo
    script:
        - cd build\Release
        - .\test-maingo.exe
        - py testMaingopy.py


build_linux:
    stage: build
    tags:
        - linux
    variables:
        GIT_STRATEGY: clone
    before_script:
        - echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
        - chmod 644 ~/.ssh/known_hosts
        - git submodule init
        - ./switchToSsh
        - git submodule update -j 1
    script:
        - mkdir build
        - cd build
        - cmake -S .. -D MAiNGO_build_test=TRUE -D MAiNGO_build_python_interface=TRUE -D MAiNGO_build_parser=false
        - make -j4
        - cd ..
    artifacts:
        paths:
            - build/test-maingo
            - build/maingopy/
            - build/testMaingopy.py
            - build/individualPythonTests/


test_linux:
    stage: test
    needs: [build_linux]
    tags:
        - linux
    script:
        - cd build
        - ./test-maingo	
        - python3 testMaingopy.py


pages:
    stage: deploy
    needs:
        - job: test_windows
          artifacts: false
        - job: test_linux
          artifacts: false
    tags:
        - linux
    script:
        - cd doc
        - doxygen Doxyfile
        - mv html ../public
        - cd ..
    artifacts:
        paths:
        - public
    only:
        - master