Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 1 | stages: |
| 2 | - build |
| 3 | |
| 4 | # FIXME: Use --werror once warnings are fixed. |
| 5 | variables: |
| 6 | MESON_ARGS: --fatal-meson-warnings |
| 7 | MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib |
| 8 | |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 9 | .build windows common: |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 10 | # See |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 11 | # https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/213 |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 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' |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 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 | |
Anurag Thakur | ede96b2 | 2021-10-12 18:26:35 +0530 | [diff] [blame] | 26 | .build macos common: |
| 27 | stage: 'build' |
| 28 | tags: |
| 29 | - 'gst-macos-11.1' |
| 30 | |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 31 | .build windows meson: |
| 32 | extends: '.build windows common' |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 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. |
AnuthaDev | 3a65f1a | 2021-10-02 10:52:15 +0000 | [diff] [blame] | 45 | - pip3 install meson==0.59.1 |
| 46 | - pip3 install -U ninja |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 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 | |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 61 | |
| 62 | # Format of job names: |
| 63 | # <OS> <Build-Tool> <Build-Params> <Architecture> |
| 64 | |
| 65 | |
| 66 | # Windows jobs |
| 67 | windows meson vs2017 amd64: |
| 68 | extends: '.build windows meson' |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 69 | variables: |
| 70 | ARCH: 'amd64' |
| 71 | |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 72 | windows meson vs2017 x86: |
| 73 | extends: '.build windows meson' |
Tim-Philipp Müller | e222932 | 2021-01-17 15:33:59 +0000 | [diff] [blame] | 74 | variables: |
| 75 | ARCH: 'x86' |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 76 | |
| 77 | |
| 78 | # Linux Jobs |
| 79 | # Jobs with "libs" in the name force enable libraries. |
| 80 | # They are disabled in rest of the jobs. |
| 81 | linux 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 Thakur | 943a6bf | 2021-10-13 21:20:35 +0530 | [diff] [blame] | 89 | --with-zlib=no \ |
| 90 | CC=gcc |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 91 | |
| 92 | make -j$(nproc) && make install |
| 93 | |
| 94 | linux 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 Thakur | 943a6bf | 2021-10-13 21:20:35 +0530 | [diff] [blame] | 102 | --with-zlib=yes \ |
| 103 | CC=gcc |
| 104 | |
| 105 | make -j$(nproc) && make install |
| 106 | |
| 107 | linux 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 Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 117 | |
| 118 | make -j$(nproc) && make install |
| 119 | |
| 120 | linux 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 | |
| 132 | linux 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 | |
| 144 | linux cmake: |
| 145 | extends: '.build linux common' |
| 146 | script: | |
AnuthaDev | 28c2d7f | 2021-07-20 21:22:14 +0530 | [diff] [blame] | 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 |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 152 | |
| 153 | cmake --build build --target install |
| 154 | |
| 155 | linux cmake libs: |
| 156 | extends: '.build linux common' |
| 157 | script: | |
AnuthaDev | 28c2d7f | 2021-07-20 21:22:14 +0530 | [diff] [blame] | 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 |
Anurag Thakur | 7be4701 | 2021-05-18 10:33:25 +0000 | [diff] [blame] | 163 | |
| 164 | cmake --build build --target install |
Anurag Thakur | ede96b2 | 2021-10-12 18:26:35 +0530 | [diff] [blame] | 165 | |
| 166 | macos 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 | |
| 177 | macos 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 | |
| 188 | macos 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 |