summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 55d056821ca6c475436c9d9b066ba76adf99e3b2 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
stages:
  - build
  - deploy

image: registry.gitlab.gnome.org/gnome/gobject-introspection:v10

cache:
  paths:
    - _ccache/

variables:
  COMMON_MESON_FLAGS: "--prefix /usr --libdir lib64 --buildtype=debug -Dglib:werror=false -Dcairo=enabled -Dpython=python3"

example-meson:
  stage: build
  variables:
    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true"
  script:
    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
    - meson compile -C _build
    - sudo meson install -C _build
    - g-ir-scanner --version
    - cd examples/library
    - meson setup --prefix /usr --default-library=both _build .
    - meson compile -C _build
    - sudo meson install -C _build
    - g-ir-inspect --print-typelibs --print-shlibs GISample
    # also build a small program using libgirepository
    - cd ../girepository
    - meson setup _build
    - meson compile -C _build

example-autotools:
  stage: build
  variables:
    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true"
  script:
    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
    - meson compile -C _build
    - sudo meson install -C _build
    - g-ir-scanner --version
    - cd examples/library
    - ./autogen.sh --prefix /usr
    - make -j
    - sudo make install
    - g-ir-inspect --print-typelibs --print-shlibs GISample

fedora-x86_64-meson:
  stage: build
  variables:
    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true -Dwerror=true"
  script:
    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
    - meson compile -C _build
    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
    - ninja -C _build gi-doc
    - mkdir -p public
    - mv _build/docs/reference/html/ public/girepository/
    - python3 -m pip install --user flake8 mypy==0.790
    - python3 -m flake8 --count
    - python3 -m mypy _build
  except:
    - tags
  artifacts:
    when: always
    name: "gi-_${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
      - public

fedora-x86_64-subprojects:
  image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v3
  stage: build
  variables:
    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
  script:
    - meson setup _build .
    - meson compile -C _build
    - meson test -C _build --print-errorlogs --suite=gobject-introspection
  except:
    - tags
  artifacts:
    when: always
    name: "gi-_${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
      - public

fedora-x86_64-no-introspection-data:
  stage: build
  variables:
    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
    EXTRA_MESON_FLAGS: "-Dwerror=true"
  script:
    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
    - meson compile -C _build
    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
  except:
    - tags
  artifacts:
    when: always
    name: "gi-_${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
      - public

fedora-x86_64-python3.6:
  stage: build
  variables:
    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
    PYENV_VERSION: "3.6.12"
  script:
    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
    - meson compile -C _build
    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
  except:
    - tags
  artifacts:
    when: always
    name: "gi-_${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
      - public

msys2-mingw64-meson:
  stage: build
  tags:
    - win32-ps
  variables:
    MSYSTEM: "MINGW64"
    CHERE_INVOKING: "yes"
  script:
    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
    - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
  artifacts:
    when: on_failure
    name: "gi-_${env:CI_COMMIT_REF_NAME}"
    paths:
      - _build/meson-logs

vs2017-x64-meson:
  stage: build
  tags:
    - win32-ps
  script:
    - .gitlab-ci/test-msvc.bat
  artifacts:
    when: on_failure
    name: "gi-_${env:CI_COMMIT_REF_NAME}"
    paths:
      - _build/meson-logs

pages:
  stage: deploy
  dependencies:
    - fedora-x86_64-meson
  script:
   - echo
  artifacts:
    paths:
      - public
  only:
    - master