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

variables:
  ZENHASKELL_IMAGE: "zenhaskell/gtk:nightly-2018-07-09"

lint:
  stage: lint
  image: ${ZENHASKELL_IMAGE}
  script:
  - hlint .

stack-build-test:
  stage: build
  image: ${ZENHASKELL_IMAGE}
  before_script:
    - apt install -y libpcap-dev
  script:
    - stack build
    - stack test
  cache:
    key: "stack-work"
    paths:
      - .stack-work

flatpak-build:
  stage: build
  image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.28

  variables:
    APP_ID: "org.freedesktop.Bustle"
    BUNDLE: "${APP_ID}.flatpak"
    REPO: "repo"
    RUNTIME_REPO: "https://flathub.org/repo/flathub.flatpakrepo"

  script:
    - flatpak-builder --repo ${REPO} app flatpak/${APP_ID}.yaml
    - flatpak build-bundle --runtime-repo=${RUNTIME_REPO} ${REPO} ${BUNDLE} ${APP_ID}

  artifacts:
    paths:
      - ${BUNDLE}
    expire_in: 30 days

  cache:
    key: "flatpak-builder-cache"
    paths:
      - .flatpak-builder/cache