summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: b29447ecde7988a09ae69b25368f4266fb58f4cb (plain) (blame)
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
stages:
  - build

ubuntu-build:
  stage: build
  parallel:
    matrix:
      - UBUNTU_VERSION: "20.04"
      - UBUNTU_VERSION: "22.04"
  image: ubuntu:$UBUNTU_VERSION
  cache:
    paths:
      - ccache
  variables:
    GIT_SUBMODULE_STRATEGY: normal
  before_script:
    - export CCACHE_BASEDIR="$PWD"
    - export CCACHE_DIR="$PWD/ccache"
    - export CCACHE_COMPILERCHECK=content
  script:
    - export DEBIAN_FRONTEND=noninteractive
    - apt-get update
    - apt-get install -y
        build-essential
        ccache
        cmake
        gettext
        libcurl4-openssl-dev
        libguichan-dev
        libphysfs-dev
        libpng-dev
        libsdl2-dev
        libsdl2-image-dev
        libsdl2-mixer-dev
        libsdl2-net-dev
        libsdl2-ttf-dev
        libxml2-dev
        ninja-build
    - ccache --zero-stats || true
    - cmake -G Ninja -B build . -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
    - cmake --build build
    - ccache --show-stats

macos-build:
  stage: build
  allow_failure: true
  tags:
    - macos
  variables:
    GIT_SUBMODULE_STRATEGY: normal
  script:
    - cmake -G Ninja -B build .
    - cmake --build build
    - cd build
    - cpack -G DragNDrop
    - mv Mana-*.dmg ..
  artifacts:
    name: "macos-dmg-$CI_COMMIT_REF_SLUG"
    paths:
      - Mana-*.dmg