.gitlab-ci.yml 1.26 KB
Newer Older
Florian Oetke's avatar
Florian Oetke committed
1
2
3
4
image: lowkey42/build-env:latest

stages:
  - build
Florian Oetke's avatar
Florian Oetke committed
5
6
7
8
  
variables:
  GIT_SUBMODULE_STRATEGY: recursive
  
Florian Oetke's avatar
Florian Oetke committed
9
10
build_gcc:
  stage: build
Florian Oetke's avatar
Florian Oetke committed
11
  script:
Florian Oetke's avatar
Florian Oetke committed
12
13
14
15
    - export CC=gcc
    - export CXX=g++
    - mkdir build
    - cd build
Florian Oetke's avatar
Florian Oetke committed
16
17
18
    - mkdir bin
    - cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
    - cmake --build . --target src/install
Florian Oetke's avatar
Florian Oetke committed
19
20
  artifacts:
    paths:
Florian Oetke's avatar
Florian Oetke committed
21
      - build/bin
Florian Oetke's avatar
Florian Oetke committed
22
    expire_in: 1 day
Florian Oetke's avatar
Florian Oetke committed
23
24
25

build_clang:
  stage: build
Florian Oetke's avatar
Florian Oetke committed
26
  script:
Florian Oetke's avatar
Florian Oetke committed
27
28
29
30
    - export CC=clang
    - export CXX=clang++
    - mkdir build
    - cd build
Florian Oetke's avatar
Florian Oetke committed
31
32
33
    - mkdir bin
    - cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
    - cmake --build . --target src/install
Florian Oetke's avatar
Florian Oetke committed
34
  artifacts:
Florian Oetke's avatar
Florian Oetke committed
35
    paths:
Florian Oetke's avatar
Florian Oetke committed
36
      - build/bin
Florian Oetke's avatar
Florian Oetke committed
37
    expire_in: 1 week
Florian Oetke's avatar
Florian Oetke committed
38
39
40
41
42
43
44
45

build_scanbuild:
  stage: build
  script: 
    - export CC=clang
    - export CXX=clang++
    - mkdir build
    - cd build
Florian Oetke's avatar
Florian Oetke committed
46
47
48
49
50
51
    - scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -G "Unix Makefiles" ..
    - scan-build --use-c++=clang++ --use-cc=clang -enable-checker deadcode.DeadStores -enable-checker security.insecureAPI.UncheckedReturn --status-bugs -v cmake --build .
  artifacts:
    paths:
      - /tmp/scan-build-*
    expire_in: 1 week
Florian Oetke's avatar
Florian Oetke committed
52
53