aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: fcdda30e2bf041d43013a379d3e4fa55ad3c9d53 (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
image: centos:latest

pages:
  only:
    - master
  before_script:
    - tar -xf cache.tar || true
  script:
    - dnf -y upgrade
    - dnf -y install flatpak flatpak-builder gnupg git xz bzip2 librsvg2
    - gdk-pixbuf-query-loaders-64 > /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache
    - printf '%s' "$GPGKEY"|base64 -d|gpg --import
    - flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    - flatpak-builder --install-deps-from=flathub --force-clean build flatpak/net.pouar.yadfa.yml
    - flatpak build-export --gpg-sign='677EE149B5AFD7E5A4A5E246C65B2BA168C7FDC4' public build
    - flatpak build-update-repo --gpg-sign='677EE149B5AFD7E5A4A5E246C65B2BA168C7FDC4' --prune-depth=10 --prune --generate-static-deltas public
    - tar -cf cache.tar .flatpak-builder public
    - mkdir yadfa-docs
    - cp build/files/share/doc/yadfa/* build/files/lib/yadfa/docs/reference/* build/files/share/info/dir build/files/share/info/yadfa-reference.info yadfa-docs
    - tar -cf - yadfa-docs|xz -9ec --lzma2=preset=9e,dict=100MB,pb=0,nice=273 - > public/yadfa-docs.tar.xz
  environment:
    name: production
  artifacts:
    paths:
    - public
  cache:
    paths:
      - cache.tar

test:
  except:
    - master
  script:
    - dnf -y upgrade
    - dnf -y install flatpak flatpak-builder gnupg git xz bzip2 librsvg2
    - gdk-pixbuf-query-loaders-64 > /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache
    - flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    - flatpak-builder --install-deps-from=flathub --force-clean build flatpak/net.pouar.yadfa.yml
  environment:
    name: production