blob: 5140aa7e0b763aa4e41f24554612e80c6186a50f [file] [log] [blame]
Tim-Philipp Müllere2229322021-01-17 15:33:59 +00001stages:
2 - build
3
4# FIXME: Use --werror once warnings are fixed.
5variables:
6 MESON_ARGS: --fatal-meson-warnings
7 MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib
8
Anurag Thakur7be47012021-05-18 10:33:25 +00009.build windows common:
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000010 # See
Anurag Thakur7be47012021-05-18 10:33:25 +000011 # https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/213
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000012 image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v14-master'
13 stage: 'build'
14 tags:
15 - 'docker'
16 - 'windows'
17 - '1809'
18 - 'gstreamer-windows'
Anurag Thakur7be47012021-05-18 10:33:25 +000019
20.build linux common:
21 # See
22 # https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896
23 image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
24 stage: 'build'
25
Anurag Thakurede96b22021-10-12 18:26:35 +053026.build macos common:
27 stage: 'build'
28 tags:
29 - 'gst-macos-11.1'
30
Anurag Thakur7be47012021-05-18 10:33:25 +000031.build windows meson:
32 extends: '.build windows common'
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000033 variables:
34 # Make sure any failure in PowerShell scripts is fatal.
35 ErrorActionPreference: 'Stop'
36 WarningPreference: 'Stop'
37 # Uncomment the following key if need to pass custom args, as well with
38 # the `$env:MESON_ARGS` line in the `script:` blocks.
39 # MESON_ARGS: >-
40 # -Dfoo=enabled
41 # -Dbar=disabled
42 before_script:
43 # Make sure meson is up to date, so we don't need to rebuild the image
44 # with each release.
AnuthaDev3a65f1a2021-10-02 10:52:15 +000045 - pip3 install meson==0.59.1
46 - pip3 install -U ninja
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000047 script:
48 # For some reason, options are separated by newlines instead of spaces,
49 # so we have to replace them first.
50 #- $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
51 # Gitlab executes PowerShell in docker, but `VsDevCmd.bat` is a batch
52 # script. Environment variables substitutions is done by PowerShell
53 # before calling `cmd.exe`, that's why we use `$env:FOO` instead of
54 # `%FOO%`.
55 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
56 meson setup build $env:MESON_ARGS_WINDOWS &&
57 meson compile --verbose -C build &&
58 meson test -C build &&
59 meson test -C build --benchmark"
60
Anurag Thakur7be47012021-05-18 10:33:25 +000061
62# Format of job names:
63# <OS> <Build-Tool> <Build-Params> <Architecture>
64
65
66# Windows jobs
67windows meson vs2017 amd64:
68 extends: '.build windows meson'
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000069 variables:
70 ARCH: 'amd64'
71
Anurag Thakur7be47012021-05-18 10:33:25 +000072windows meson vs2017 x86:
73 extends: '.build windows meson'
Tim-Philipp Müllere2229322021-01-17 15:33:59 +000074 variables:
75 ARCH: 'x86'
Anurag Thakur7be47012021-05-18 10:33:25 +000076
77
78# Linux Jobs
79# Jobs with "libs" in the name force enable libraries.
80# They are disabled in rest of the jobs.
81linux autotools:
82 extends: '.build linux common'
83 script: |
84 ./autogen.sh
85 ./configure --with-brotli=no \
86 --with-bzip2=no \
87 --with-harfbuzz=no \
88 --with-png=no \
Anurag Thakur943a6bf2021-10-13 21:20:35 +053089 --with-zlib=no \
90 CC=gcc
Anurag Thakur7be47012021-05-18 10:33:25 +000091
92 make -j$(nproc) && make install
93
94linux autotools libs:
95 extends: '.build linux common'
96 script: |
97 ./autogen.sh
98 ./configure --with-brotli=yes \
99 --with-bzip2=yes \
100 --with-harfbuzz=yes \
101 --with-png=yes \
Anurag Thakur943a6bf2021-10-13 21:20:35 +0530102 --with-zlib=yes \
103 CC=gcc
104
105 make -j$(nproc) && make install
106
107linux autotools libs clang:
108 extends: '.build linux common'
109 script: |
110 ./autogen.sh
111 ./configure --with-brotli=yes \
112 --with-bzip2=yes \
113 --with-harfbuzz=yes \
114 --with-png=yes \
115 --with-zlib=yes \
116 CC=clang
Anurag Thakur7be47012021-05-18 10:33:25 +0000117
118 make -j$(nproc) && make install
119
120linux meson:
121 extends: '.build linux common'
122 script: |
123 meson setup build -Dbrotli=disabled \
124 -Dbzip2=disabled \
125 -Dharfbuzz=disabled \
126 -Dpng=disabled \
127 -Dzlib=disabled
128
129 meson compile --verbose -C build
130 meson install -C build
131
132linux meson libs:
133 extends: '.build linux common'
134 script: |
135 meson setup build -Dbrotli=enabled \
136 -Dbzip2=enabled \
137 -Dharfbuzz=disabled \
138 -Dpng=disabled \
139 -Dzlib=disabled
140
141 meson compile --verbose -C build
142 meson install -C build
143
144linux cmake:
145 extends: '.build linux common'
146 script: |
AnuthaDev28c2d7f2021-07-20 21:22:14 +0530147 cmake -B build -D FT_DISABLE_BROTLI=TRUE \
148 -D FT_DISABLE_BZIP2=TRUE \
149 -D FT_DISABLE_HARFBUZZ=TRUE \
150 -D FT_DISABLE_PNG=TRUE \
151 -D FT_DISABLE_ZLIB=TRUE
Anurag Thakur7be47012021-05-18 10:33:25 +0000152
153 cmake --build build --target install
154
155linux cmake libs:
156 extends: '.build linux common'
157 script: |
AnuthaDev28c2d7f2021-07-20 21:22:14 +0530158 cmake -B build -D FT_REQUIRE_BROTLI=TRUE \
159 -D FT_REQUIRE_BZIP2=TRUE \
160 -D FT_REQUIRE_HARFBUZZ=TRUE \
161 -D FT_REQUIRE_PNG=TRUE \
162 -D FT_REQUIRE_ZLIB=TRUE
Anurag Thakur7be47012021-05-18 10:33:25 +0000163
164 cmake --build build --target install
Anurag Thakurede96b22021-10-12 18:26:35 +0530165
166macos autotools:
167 extends: '.build macos common'
168 before_script:
169 - '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
170 script:
171 - brew install autoconf automake libtool
172 - ./autogen.sh
173 - ./configure
174 - 'make -j$(sysctl -n hw.logicalcpu)'
175 - make install
176
177macos autotools clang:
178 extends: '.build macos common'
179 before_script:
180 - '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
181 script:
182 - brew install autoconf automake libtool
183 - ./autogen.sh
184 - './configure CC=clang'
185 - 'make -j$(sysctl -n hw.logicalcpu)'
186 - make install
187
188macos meson:
189 extends: '.build macos common'
190 script:
191 - pip3 install --upgrade pip
192 - pip3 install -U meson
193 - pip3 install --upgrade certifi
194 - pip3 install -U ninja
195
196 - meson setup build
197 - meson compile --verbose -C build
198 - sudo meson install -C build