.gitlab-ci.yml 1.9 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
    - export CC=gcc
    - export CXX=g++
14
15
    - mkdir build
    - cd build
Florian Oetke's avatar
Florian Oetke committed
16
    - mkdir bin
17
    - rm -rf src
Florian Oetke's avatar
Florian Oetke committed
18
19
    - 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
20
    - cmake --build . --target test
21
    - wget -nc -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz
22
    - cd bin/bin
23
    - tar xf ../../model_data.tar.xz
Florian Oetke's avatar
Florian Oetke committed
24
25
  artifacts:
    paths:
26
      - build/bin
Florian Oetke's avatar
Florian Oetke committed
27
    expire_in: 1 day
Florian Oetke's avatar
Florian Oetke committed
28
29
30
  cache:
    key: "${CI_PIPELINE_ID}-${CI_COMMIT_REF_SLUG}"
    paths:
31
    - build
Florian Oetke's avatar
Florian Oetke committed
32
33
34

build_clang:
  stage: build
Florian Oetke's avatar
Florian Oetke committed
35
  script:
Florian Oetke's avatar
Florian Oetke committed
36
37
    - export CC=clang
    - export CXX=clang++
38
39
    - mkdir build
    - cd build
Florian Oetke's avatar
Florian Oetke committed
40
    - mkdir bin
41
    - rm -rf src
Florian Oetke's avatar
Florian Oetke committed
42
43
    - 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
44
    - cmake --build . --target test
45
    - wget -nc -Omodel_data.tar.xz https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data.tar.xz
46
    - cd bin/bin
47
    - tar xf ../../model_data.tar.xz
Florian Oetke's avatar
Florian Oetke committed
48
  artifacts:
Florian Oetke's avatar
Florian Oetke committed
49
    paths:
50
      - build/bin
Florian Oetke's avatar
Florian Oetke committed
51
    expire_in: 1 week
Florian Oetke's avatar
Florian Oetke committed
52
53
54
  cache:
    key: "${CI_PIPELINE_ID}-${CI_COMMIT_REF_SLUG}"
    paths:
55
    - build
Florian Oetke's avatar
Florian Oetke committed
56
57
58
59
60
61
62
63

build_scanbuild:
  stage: build
  script: 
    - export CC=clang
    - export CXX=clang++
    - mkdir build
    - cd build
64
    - 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
65
    - 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
66
67
  artifacts:
    paths:
Florian Oetke's avatar
Florian Oetke committed
68
      - build/result
Florian Oetke's avatar
Florian Oetke committed
69
    expire_in: 1 week
70
    when: always
Florian Oetke's avatar
Florian Oetke committed
71
72