.gitlab-ci.yml 1.75 KB
Newer Older
1 2 3 4 5 6 7
stages:
  - check
  - build

variables:
  DEPENDENCIES: python3 pygobject3 gobject-introspection
                python3-gobject gtk3 gtksourceview3
8
                python3-pytest intltool glib2-devel
9

10 11 12 13 14
.linux-common: &linux-common
  image: fedora:rawhide
  before_script:
    - dnf update -y
    - dnf install -y $DEPENDENCIES
15 16 17 18 19

flake8:
  stage: check
  script:
    - pip3 install -r dev-requirements.txt
20
    - flake8 bin/meld meld/
21
  allow_failure: true
22
  <<: *linux-common
23

24
linux-pytest:
25 26 27
  stage: check
  script:
    - py.test-3 test/
28
  <<: *linux-common
29

30
linux-build:
31 32 33
  stage: build
  script:
    - python3 setup.py build
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 61 62 63 64
  <<: *linux-common

.mingw-common: &mingw-common
  stage: build
  tags: # select gitlab runners with specific tag (unrelated to git repo tags)
    - win32
  artifacts:
    name: "%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
    paths:
      - dist/
  before_script:
    - path C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
    - pacman --noconfirm -S --refresh --sysupgrade --needed mingw-w64-%MSYS2_ARCH%-python3-cx_Freeze mingw-w64-%MSYS2_ARCH%-python3-gobject mingw-w64-%MSYS2_ARCH%-python3-pytest mingw-w64-%MSYS2_ARCH%-gtksourceview3 mingw-w64-%MSYS2_ARCH%-gsettings-desktop-schemas glib2-devel intltool
  script:
    - glib-compile-schemas data
    - python3 setup_win32.py bdist_dumb --bdist-dir build\bdist.mingw\msi --keep-temp bdist_msi --keep-temp
  # main purpose of this job is creating installers and not checking for breakage by changes in code
  # so allow failures since the status of the build may depend on updates of rolling-release msys2 packages
  allow_failure: true

mingw64-dist:
  variables:
    MSYS2_ARCH: x86_64
    MSYSTEM: MINGW64
  <<: *mingw-common

mingw32-dist:
  variables:
    MSYS2_ARCH: i686
    MSYSTEM: "MINGW32"
  <<: *mingw-common