Msbuild test

This commit is contained in:
Anurag Thakur 2023-12-16 23:19:47 +05:30
parent 8eab511017
commit 34127f861a
1 changed files with 181 additions and 174 deletions

View File

@ -19,46 +19,46 @@ variables:
- '2022' - '2022'
- 'gstreamer-windows' - 'gstreamer-windows'
.build linux common: # .build linux common:
# See # # See
# https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896 # # https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896
image: 'registry.freedesktop.org/freetype/docker-images/debian:latest' # image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
stage: 'build' # stage: 'build'
#
.build macos common: # .build macos common:
stage: 'build' # stage: 'build'
tags: # tags:
- 'gst-macos-11.1' # - 'gst-macos-11.1'
.build windows meson: .build windows meson:
extends: '.build windows common' extends: '.build windows common'
variables: variables:
# Make sure any failure in PowerShell scripts is fatal. # Make sure any failure in PowerShell scripts is fatal.
ErrorActionPreference: 'Stop' # ErrorActionPreference: 'Stop'
WarningPreference: 'Stop' # WarningPreference: 'Stop'
# Uncomment the following key if you need to pass custom args, as well # Uncomment the following key if you need to pass custom args, as well
# with the `$env:MESON_ARGS` line in the `script:` blocks. # with the `$env:MESON_ARGS` line in the `script:` blocks.
# MESON_ARGS: >- # MESON_ARGS: >-
# -Dfoo=enabled # -Dfoo=enabled
# -Dbar=disabled # -Dbar=disabled
before_script: # before_script:
# Update RootCAs in order to access to some sites. # # Update RootCAs in order to access to some sites.
- certutil -generateSSTFromWU "C:\roots.sst" # - certutil -generateSSTFromWU "C:\roots.sst"
- Import-Certificate -CertStoreLocation "Cert:\LocalMachine\Root" "C:\roots.sst" # - Import-Certificate -CertStoreLocation "Cert:\LocalMachine\Root" "C:\roots.sst"
# Make sure meson is up to date so we don't need to rebuild the image # # Make sure meson is up to date so we don't need to rebuild the image
# with each release. # # with each release.
- pip3 install -U 'meson==0.59.*' # - pip3 install -U 'meson==0.59.*'
- pip3 install --upgrade certifi # - pip3 install --upgrade certifi
- pip3 install -U ninja # - pip3 install -U ninja
#
# Generate a UWP cross-file in case it's used # # Generate a UWP cross-file in case it's used
- $PSDefaultParameterValues['Out-File:Encoding'] = 'ASCII' # - $PSDefaultParameterValues['Out-File:Encoding'] = 'ASCII'
- echo "[binaries]" > uwp-crossfile.meson # - echo "[binaries]" > uwp-crossfile.meson
- echo "c = 'cl'" >> uwp-crossfile.meson # - echo "c = 'cl'" >> uwp-crossfile.meson
- echo "strip = ['true']" >> uwp-crossfile.meson # - echo "strip = ['true']" >> uwp-crossfile.meson
- echo "[built-in options]" >> uwp-crossfile.meson # - echo "[built-in options]" >> uwp-crossfile.meson
- echo "c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP', '-DUNICODE', '-D_WIN32_WINNT=0x0A00', '-we4013']" >> uwp-crossfile.meson # - echo "c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP', '-DUNICODE', '-D_WIN32_WINNT=0x0A00', '-we4013']" >> uwp-crossfile.meson
- echo "c_winlibs = ['windowsapp.lib']" >> uwp-crossfile.meson # - echo "c_winlibs = ['windowsapp.lib']" >> uwp-crossfile.meson
script: script:
# For some reason, options are separated by newlines instead of spaces, # For some reason, options are separated by newlines instead of spaces,
# so we have to replace them first. # so we have to replace them first.
@ -69,10 +69,17 @@ variables:
# script. Environment variables substitutions is done by PowerShell # script. Environment variables substitutions is done by PowerShell
# before calling `cmd.exe`, that's why we use `$env:FOO` instead of # before calling `cmd.exe`, that's why we use `$env:FOO` instead of
# `%FOO%`. # `%FOO%`.
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH $env:VS_UWP && # - cmd.exe /c "%VS120COMNTOOLS%\vsvars32.bat"
meson setup build $env:MESON_ARGS_WINDOWS $env:MESON_ARGS_UWP && # - 'call "%VS120COMNTOOLS%\vsvars32.bat"'
meson compile --verbose -C build # - call $env:VS120COMNTOOLS
$env:MESON_WINDOWS_TESTS" - git submodule update --init --recursive
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
MSBUILD.exe -t:Rebuild
-p:Configuration=Debug
-p:Platform=x64
-p:UserDefines=FT_DEBUG_LOGGING
MSBuild.sln"
# Format of job names: # Format of job names:
@ -87,144 +94,144 @@ windows meson vs2019 amd64:
ARCH: 'amd64' ARCH: 'amd64'
MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark'
windows meson vs2019 x86: # windows meson vs2019 x86:
extends: '.build windows meson' # extends: '.build windows meson'
variables: # variables:
ARCH: 'x86' # ARCH: 'x86'
MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' # MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark'
windows meson vs2019 amd64 uwp:
extends: '.build windows meson'
variables:
ARCH: 'amd64'
VS_UWP: '-app_platform=UWP'
MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"'
# Linux Jobs.
# #
# Jobs with "libs" in the name force-enable libraries. # windows meson vs2019 amd64 uwp:
# They are disabled for the remaining jobs. # extends: '.build windows meson'
# variables:
linux autotools: # ARCH: 'amd64'
extends: '.build linux common' # VS_UWP: '-app_platform=UWP'
script: | # MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"'
./autogen.sh #
./configure --with-brotli=no \ # # Linux Jobs.
--with-bzip2=no \ # #
--with-harfbuzz=no \ # # Jobs with "libs" in the name force-enable libraries.
--with-png=no \ # # They are disabled for the remaining jobs.
--with-zlib=no \ #
CC=gcc # linux autotools:
# extends: '.build linux common'
make -j$(nproc) && make install # script: |
# ./autogen.sh
linux autotools libs: # ./configure --with-brotli=no \
extends: '.build linux common' # --with-bzip2=no \
script: | # --with-harfbuzz=no \
./autogen.sh # --with-png=no \
./configure --with-brotli=yes \ # --with-zlib=no \
--with-bzip2=yes \ # CC=gcc
--with-harfbuzz=yes \ #
--with-png=yes \ # make -j$(nproc) && make install
--with-zlib=yes \ #
CC=gcc # linux autotools libs:
# extends: '.build linux common'
make -j$(nproc) && make install # script: |
# ./autogen.sh
linux autotools libs clang: # ./configure --with-brotli=yes \
extends: '.build linux common' # --with-bzip2=yes \
script: | # --with-harfbuzz=yes \
./autogen.sh # --with-png=yes \
./configure --with-brotli=yes \ # --with-zlib=yes \
--with-bzip2=yes \ # CC=gcc
--with-harfbuzz=yes \ #
--with-png=yes \ # make -j$(nproc) && make install
--with-zlib=yes \ #
CC=clang # linux autotools libs clang:
# extends: '.build linux common'
make -j$(nproc) && make install # script: |
# ./autogen.sh
linux meson: # ./configure --with-brotli=yes \
extends: '.build linux common' # --with-bzip2=yes \
script: | # --with-harfbuzz=yes \
meson setup build ${MESON_ARGS} \ # --with-png=yes \
-Dbrotli=disabled \ # --with-zlib=yes \
-Dbzip2=disabled \ # CC=clang
-Dharfbuzz=disabled \ #
-Dpng=disabled \ # make -j$(nproc) && make install
-Dzlib=disabled #
# linux meson:
meson compile --verbose -C build # extends: '.build linux common'
meson install -C build # script: |
# meson setup build ${MESON_ARGS} \
linux meson libs: # -Dbrotli=disabled \
extends: '.build linux common' # -Dbzip2=disabled \
script: | # -Dharfbuzz=disabled \
meson setup build ${MESON_ARGS} \ # -Dpng=disabled \
-Dbrotli=enabled \ # -Dzlib=disabled
-Dbzip2=enabled \ #
-Dharfbuzz=disabled \ # meson compile --verbose -C build
-Dpng=disabled \ # meson install -C build
-Dzlib=disabled #
# linux meson libs:
meson compile --verbose -C build # extends: '.build linux common'
meson install -C build # script: |
# meson setup build ${MESON_ARGS} \
linux cmake: # -Dbrotli=enabled \
extends: '.build linux common' # -Dbzip2=enabled \
script: | # -Dharfbuzz=disabled \
cmake -B build -D FT_DISABLE_BROTLI=TRUE \ # -Dpng=disabled \
-D FT_DISABLE_BZIP2=TRUE \ # -Dzlib=disabled
-D FT_DISABLE_HARFBUZZ=TRUE \ #
-D FT_DISABLE_PNG=TRUE \ # meson compile --verbose -C build
-D FT_DISABLE_ZLIB=TRUE # meson install -C build
#
cmake --build build --target install # linux cmake:
# extends: '.build linux common'
linux cmake libs: # script: |
extends: '.build linux common' # cmake -B build -D FT_DISABLE_BROTLI=TRUE \
script: | # -D FT_DISABLE_BZIP2=TRUE \
cmake -B build -D FT_REQUIRE_BROTLI=TRUE \ # -D FT_DISABLE_HARFBUZZ=TRUE \
-D FT_REQUIRE_BZIP2=TRUE \ # -D FT_DISABLE_PNG=TRUE \
-D FT_REQUIRE_HARFBUZZ=TRUE \ # -D FT_DISABLE_ZLIB=TRUE
-D FT_REQUIRE_PNG=TRUE \ #
-D FT_REQUIRE_ZLIB=TRUE # cmake --build build --target install
#
cmake --build build --target install # linux cmake libs:
# extends: '.build linux common'
# script: |
# MacOS jobs. # cmake -B build -D FT_REQUIRE_BROTLI=TRUE \
# -D FT_REQUIRE_BZIP2=TRUE \
macos autotools: # -D FT_REQUIRE_HARFBUZZ=TRUE \
extends: '.build macos common' # -D FT_REQUIRE_PNG=TRUE \
before_script: # -D FT_REQUIRE_ZLIB=TRUE
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"' #
script: # cmake --build build --target install
- brew install autoconf automake libtool #
- ./autogen.sh #
- ./configure # # MacOS jobs.
- 'make -j$(sysctl -n hw.logicalcpu)' #
- make install # macos autotools:
# extends: '.build macos common'
macos autotools clang: # before_script:
extends: '.build macos common' # - '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
before_script: # script:
- '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"' # - brew install autoconf automake libtool
script: # - ./autogen.sh
- brew install autoconf automake libtool # - ./configure
- ./autogen.sh # - 'make -j$(sysctl -n hw.logicalcpu)'
- './configure CC=clang' # - make install
- 'make -j$(sysctl -n hw.logicalcpu)' #
- make install # macos autotools clang:
# extends: '.build macos common'
macos meson: # before_script:
extends: '.build macos common' # - '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
script: # script:
- pip3 install --upgrade pip # - brew install autoconf automake libtool
- pip3 install -U meson # - ./autogen.sh
- pip3 install --upgrade certifi # - './configure CC=clang'
- pip3 install -U ninja # - 'make -j$(sysctl -n hw.logicalcpu)'
# - make install
- meson setup build ${MESON_ARGS} #
- meson compile --verbose -C build # macos meson:
- sudo meson install -C build # extends: '.build macos common'
# script:
# - pip3 install --upgrade pip
# - pip3 install -U meson
# - pip3 install --upgrade certifi
# - pip3 install -U ninja
#
# - meson setup build ${MESON_ARGS}
# - meson compile --verbose -C build
# - sudo meson install -C build