.gitlab-ci.yml 1.46 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
  
variables:
  GIT_SUBMODULE_STRATEGY: recursive
Florian Oetke's avatar
Florian Oetke committed
8
  GIT_SSL_NO_VERIFY: "1"
Florian Oetke's avatar
Florian Oetke committed
9
  
Florian Oetke's avatar
Florian Oetke committed
10
11
build_gcc:
  stage: build
Florian Oetke's avatar
Florian Oetke committed
12
  script:
Florian Oetke's avatar
Florian Oetke committed
13
14
    - export CC=gcc
    - export CXX=g++
Florian Oetke's avatar
Florian Oetke committed
15
    - mkdir -p build
16
    - cd build
Florian Oetke's avatar
Florian Oetke committed
17
    - mkdir -p bin
18
    - rm -rf src
Florian Oetke's avatar
Florian Oetke committed
19
20
    - cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release ..
    - cmake --build . --target all
Florian Oetke's avatar
Florian Oetke committed
21
    - cmake --build . --target src/install
Florian Oetke's avatar
Florian Oetke committed
22
    - cmake --build . --target test
Florian Oetke's avatar
Florian Oetke committed
23
24
  artifacts:
    paths:
25
      - build/bin
Florian Oetke's avatar
Florian Oetke committed
26
    expire_in: 1 day
Florian Oetke's avatar
Florian Oetke committed
27
28
29

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

Florian Oetke's avatar
Florian Oetke committed
46
.build_scanbuild:
Florian Oetke's avatar
Florian Oetke committed
47
48
49
50
  stage: build
  script: 
    - export CC=clang
    - export CXX=clang++
Florian Oetke's avatar
Florian Oetke committed
51
    - mkdir -p build
Florian Oetke's avatar
Florian Oetke committed
52
    - cd build
53
    - scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -DMIRRAGE_ENABLE_COTIRE=OFF -G "Unix Makefiles" ..
Florian Oetke's avatar
Florian Oetke committed
54
    - scan-build -o result --use-c++=clang++ --use-cc=clang -enable-checker deadcode.DeadStores -enable-checker security.insecureAPI.UncheckedReturn --status-bugs -v cmake --build . || true
Florian Oetke's avatar
Florian Oetke committed
55
56
  artifacts:
    paths:
Florian Oetke's avatar
Florian Oetke committed
57
      - build/result
Florian Oetke's avatar
Florian Oetke committed
58
    expire_in: 2 day
59
    when: always
Florian Oetke's avatar
Florian Oetke committed
60
61