mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
gitlab-ci: Expand CI job for building with a C++ compiler
This tests out if libweston can be built with a C++ compiler and catch potential issues which we don't normally see. We re-use one of the builds, the full-x86-64 one, and build this new front-end alongside it. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
10f8b4ba81
commit
c335ec70af
4 changed files with 131 additions and 0 deletions
|
|
@ -260,12 +260,15 @@ aarch64-debian-container_prep:
|
|||
timeout: 15m
|
||||
variables:
|
||||
BUILDDIR: $CI_PROJECT_DIR/build-weston-$CI_JOB_NAME
|
||||
BUILDDIR_WESTINY: $CI_PROJECT_DIR/build-westiny-$CI_JOB_NAME
|
||||
PREFIX: $CI_PROJECT_DIR/prefix-weston-$CI_JOB_NAME
|
||||
PREFIX_WESTINY: $CI_PROJECT_DIR/prefix-westiny-$CI_JOB_NAME
|
||||
before_script:
|
||||
- export PATH=~/.local/bin:$PATH
|
||||
- export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
- export TESTS_RES_PATH="$BUILDDIR/tests-res.txt"
|
||||
- mkdir "$BUILDDIR" "$PREFIX"
|
||||
- mkdir "$BUILDDIR_WESTINY" "$PREFIX_WESTINY"
|
||||
|
||||
.build-with-clang:
|
||||
variables:
|
||||
|
|
@ -286,6 +289,17 @@ aarch64-debian-container_prep:
|
|||
- meson --prefix="$PREFIX" --wrap-mode=nofallback -Db_sanitize=address ${MESON_OPTIONS} ${MESON_TOOLCHAIN_OPTIONS} ${MESON_DIST_OPTIONS} ..
|
||||
- ninja -k0 -j${FDO_CI_CONCURRENT:-4}
|
||||
- ninja install
|
||||
- |
|
||||
if [ "$CI_JOB_NAME" == "x86_64-debian-full-build" ]; then
|
||||
cd "$BUILDDIR_WESTINY"
|
||||
export NPREFIX=$CI_PROJECT_DIR/prefix-weston-$CI_JOB_NAME
|
||||
export PKG_CONFIG_PATH=$NPREFIX/lib/pkgconfig/:$NPREFIX/share/pkgconfig/:$NPREFIX/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
|
||||
meson setup --prefix="$PREFIX_WESTINY" --wrap-mode=nofallback ../westinyplus/
|
||||
ninja -k0 -j${FDO_CI_CONCURRENT:-4}
|
||||
ninja install
|
||||
ninja clean
|
||||
cd -
|
||||
fi
|
||||
- test -n "${QEMU_SMP}" || QEMU_SMP=${FDO_CI_CONCURRENT:-4}
|
||||
- virtme-run --rw --pwd --kimg /weston-virtme/${KERNEL_IMAGE} --kopt quiet --kopt log_buf_len=2M --script-sh ../.gitlab-ci/virtme-scripts/run-weston-tests.sh --qemu-opts -m 4096 -smp ${QEMU_SMP}
|
||||
- TEST_RES=$(cat $TESTS_RES_PATH)
|
||||
|
|
|
|||
40
westinyplus/meson.build
Normal file
40
westinyplus/meson.build
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
project('westinyplus',
|
||||
'c', 'cpp',
|
||||
version: '0.0.90',
|
||||
default_options: [
|
||||
'warning_level=3',
|
||||
'cpp_std=c++20',
|
||||
'werror=true',
|
||||
],
|
||||
meson_version: '>= 1.0.0',
|
||||
license: 'MIT/Expat',
|
||||
)
|
||||
|
||||
cxx = meson.get_compiler('cpp')
|
||||
|
||||
add_project_arguments(
|
||||
cxx.get_supported_arguments([
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-pedantic',
|
||||
'-Wno-deprecated-declarations'
|
||||
]),
|
||||
language: 'cpp'
|
||||
)
|
||||
|
||||
add_project_arguments([
|
||||
'-DPACKAGE_STRING="westinyplus @0@"'.format(meson.project_version()),
|
||||
'-D_GNU_SOURCE',
|
||||
'-D_ALL_SOURCE',
|
||||
],
|
||||
language: [ 'cpp', 'c' ],
|
||||
)
|
||||
|
||||
exe_westinyplus = executable(
|
||||
'westinyplus',
|
||||
sources: [ 'src/main.cpp' ],
|
||||
dependencies: [ dependency('wayland-server'),
|
||||
dependency('weston'),
|
||||
dependency('libweston-14') ],
|
||||
include_directories : include_directories('.'),
|
||||
install: false
|
||||
)
|
||||
31
westinyplus/src/main.cpp
Normal file
31
westinyplus/src/main.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright © 2024 Collabora, Ltd.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial
|
||||
* portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
46
westinyplus/src/main.h
Normal file
46
westinyplus/src/main.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright © 2024 Collabora, Ltd.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial
|
||||
* portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <weston.h>
|
||||
#include <libweston/libweston.h>
|
||||
#include <libweston/weston-log.h>
|
||||
#include <libweston/desktop.h>
|
||||
#include <libweston/config-parser.h>
|
||||
#include <libweston/shell-utils.h>
|
||||
#include <libweston/zalloc.h>
|
||||
#include <libweston/matrix.h>
|
||||
#include <libweston/xwayland-api.h>
|
||||
|
||||
#include <libweston/backend-drm.h>
|
||||
#include <libweston/backend-headless.h>
|
||||
#include <libweston/backend-x11.h>
|
||||
#include <libweston/backend-wayland.h>
|
||||
|
||||
#include <libweston/backend-rdp.h>
|
||||
#include <libweston/backend-vnc.h>
|
||||
#include <libweston/backend-pipewire.h>
|
||||
#include <libweston/windowed-output-api.h>
|
||||
Loading…
Add table
Reference in a new issue