.gitlab-ci.yml 1.72 KB
Newer Older
Marinus Schraal's avatar
Marinus Schraal committed
1
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32
2 3
stages:
  - check
Jean Felder's avatar
Jean Felder committed
4
  - build-flatpak
5
  - deploy
6 7

variables:
Jean Felder's avatar
Jean Felder committed
8
  BUNDLE: "gnome-music-dev.flatpak"
9
  DBUS_ID: "org.gnome.MusicDevel"
Jean Felder's avatar
Jean Felder committed
10 11 12 13
  FLATPAK_MODULE: "gnome-music"
  GIT_SUBMODULE_STRATEGY: normal
  MANIFEST_PATH: "org.gnome.Music.json"
  RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
14

Jean Felder's avatar
Jean Felder committed
15 16
flatpak:
  stage: build-flatpak
17
  script:
Jean Felder's avatar
Jean Felder committed
18
    - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
19
    - flatpak build app meson --prefix=/app -Dprofile=development _build
Jean Felder's avatar
Jean Felder committed
20 21
    - flatpak build app ninja -C _build install
    - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
22
    - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
Jean Felder's avatar
Jean Felder committed
23 24 25 26 27 28 29 30
  artifacts:
    paths:
      - ${BUNDLE}
      - _build/meson-logs/meson-log.txt
    expire_in: 2 days
  cache:
    paths:
      - .flatpak-builder/cache
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

review:
    stage: deploy
    dependencies:
        - flatpak
    script:
        - echo "Generating flatpak deployment"
    artifacts:
        paths:
            - ${BUNDLE}
        expire_in: 30 days
    environment:
        name: review/$CI_COMMIT_REF_NAME
        url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
        on_stop: stop_review
    except:
        - master@GNOME/gnome-music
48
        - tags
49 50 51 52 53 54 55 56 57 58 59

stop_review:
    stage: deploy
    script:
        - echo "Stopping flatpak deployment"
    when: manual
    environment:
        name: review/$CI_COMMIT_REF_NAME
        action: stop
    except:
        - master@GNOME/gnome-music
60
        - tags
61

62
flake8:
63 64
  stage: check
  script:
65
    - dnf install -y python3-flake8
66
    - flake8 --ignore E402,W503 --show-source --exclude=grilo.py,query.py gnomemusic/