1stages: 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 9.build windows common: 10 # See 11 # https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/213 12 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' 19 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 26.build macos common: 27 stage: 'build' 28 tags: 29 - 'gst-macos-11.1' 30 31.build windows meson: 32 extends: '.build windows common' 33 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. 45 - pip3 install meson==0.59.1 46 - pip3 install -U ninja 47 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 61 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' 69 variables: 70 ARCH: 'amd64' 71 72windows meson vs2017 x86: 73 extends: '.build windows meson' 74 variables: 75 ARCH: 'x86' 76 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 \ 89 --with-zlib=no \ 90 CC=gcc 91 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 \ 102 --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 117 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: | 147 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 152 153 cmake --build build --target install 154 155linux cmake libs: 156 extends: '.build linux common' 157 script: | 158 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 163 164 cmake --build build --target install 165 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 199