Merge branch 'ebassi/ci-image-for-main' into 'main'

ci: Install Meson in the build jobs

See merge request GNOME/gtk!5335
This commit is contained in:
Matthias Clasen 2022-12-16 03:55:18 +00:00
commit aafc6279a3
2 changed files with 74 additions and 31 deletions

View File

@ -85,10 +85,16 @@ fedora-x86_64:
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
script:
- .gitlab-ci/show-info-linux.sh
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson subprojects download
- mkdir _install
- meson --prefix=${CI_PROJECT_DIR}/_install
${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
- meson setup
--prefix=${CI_PROJECT_DIR}/_install
${COMMON_MESON_FLAGS}
${EXTRA_MESON_FLAGS}
${BACKEND_FLAGS}
${FEATURE_FLAGS}
_build
- meson compile -C _build
- meson install -C _build
@ -107,10 +113,11 @@ release-build:
EXTRA_MESON_FLAGS: "--buildtype=release"
script:
- .gitlab-ci/show-info-linux.sh
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson subprojects download
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
_build
- ninja -C _build
- meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS} _build
- meson compile -C _build
- .gitlab-ci/run-tests.sh _build x11
fedora-mingw64:
@ -131,6 +138,8 @@ fedora-mingw64:
# mingw64-graphene (rawhide)
script:
- .gitlab-ci/show-info-linux.sh
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson subprojects download
- mkdir _build && cd _build
- mingw64-meson -Dintrospection=disabled -Dgraphene:introspection=disabled
@ -141,19 +150,28 @@ installed-tests:
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true"
EXTRA_MESON_FLAGS: "-Dinstall-tests=true"
G_TEST_ACCESSIBLE: 1
script:
- .gitlab-ci/show-info-linux.sh
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson subprojects download
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
_build
- ninja -C _build
- sudo ninja -C _build install
- meson setup
--prefix="${CI_PROJECT_DIR}/_installed"
${COMMON_MESON_FLAGS}
${EXTRA_MESON_FLAGS}
${BACKEND_FLAGS}
${FEATURE_FLAGS}
_build
- meson compile -C _build
- meson install -C _build
- export LD_LIBRARY_PATH=${CI_PROJECT_DIR}/_install/lib64
- dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24"
gnome-desktop-testing-runner
--report-directory=_build/installed-tests-report/failed/
--parallel=0
--dirs "${CI_PROJECT_DIR}/_installed/share"
gtk-4.0
artifacts:
paths:
@ -200,12 +218,13 @@ macos:
needs: []
before_script:
- bash .gitlab-ci/show-info-osx.sh
- pip3 install --user meson==0.60.3
- pip3 install --user meson~=0.64
- pip3 install --user ninja
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
- export MESON_FORCE_BACKTRACE=1
script:
- meson -Dx11-backend=false
- meson setup
-Dx11-backend=false
-Dbroadway-backend=true
-Dmacos-backend=true
-Dmedia-gstreamer=disabled
@ -214,7 +233,7 @@ macos:
-Dpixman:tests=disabled
-Dlibjpeg-turbo:simd=disabled
_build
- ninja -C _build
- meson compile -C _build
artifacts:
when: always
paths:
@ -339,7 +358,9 @@ static-scan:
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug"
script:
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _scan_build
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _scan_build
- ninja -C _scan_build scan-build
artifacts:
paths:
@ -355,7 +376,9 @@ asan-build:
needs: []
variables:
script:
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- CC=clang meson setup --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
- ninja -C _build
- .gitlab-ci/run-tests.sh _build wayland
artifacts:
@ -370,7 +393,9 @@ reference:
variables:
EXTRA_MESON_FLAGS: "--buildtype=release --force-fallback-for=gdk-pixbuf,pango"
script:
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true -Dgdk-pixbuf:gtk_doc=true -Dpango:gtk_doc=true _build
- export PATH="$HOME/.local/bin:$PATH"
- pip3 install --user meson~=0.64
- meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true -Dgdk-pixbuf:gtk_doc=true -Dpango:gtk_doc=true _build
- meson compile -C _build
- mkdir -p _reference/
- mv _build/docs/reference/gdk/gdk4/ _reference/gdk4/

View File

@ -84,8 +84,6 @@ compare_render_tests = [
'repeat-texture',
'transform-in-transform',
'transform-in-transform-in-transform',
'unaligned-offscreen',
'upside-down-label-3d', # not really 3d, but cairo fails it
'rounded-clip-in-clip-3d', # not really 3d, but cairo fails it
]
@ -98,29 +96,49 @@ informative_render_tests = [
]
renderers = [
# name exclude term
[ 'gl', '' ],
[ 'broadway', '-3d' ],
[ 'cairo', '-3d' ],
{ 'name': 'gl' },
{ 'name': 'broadway', 'exclude_term': '-3d' },
{ 'name': 'cairo', 'exclude_term': '-3d' },
]
compare_xfails = [
# Both tests fail because of some font rendering issue
'unaligned-offscreen',
'upside-down-label-3d', # not really 3d, but cairo fails it
]
foreach renderer : renderers
foreach test : compare_render_tests
if ((renderer[1] == '' or not test.contains(renderer[1])) and
(renderer[0] != 'broadway' or broadway_enabled))
test(renderer[0] + ' ' + test, compare_render,
foreach testname : compare_render_tests
renderer_name = renderer.get('name')
exclude_term = renderer.get('exclude_term', '')
suites = [
'gsk',
'gsk-compare',
'gsk-' + renderer_name,
'gsk-compare-' + renderer_name,
]
if compare_xfails.contains(testname)
suites += 'failing'
endif
if ((exclude_term == '' or not testname.contains(exclude_term)) and
(renderer_name != 'broadway' or broadway_enabled))
test(renderer_name + ' ' + testname, compare_render,
args: [
'--output', join_paths(meson.current_build_dir(), 'compare', renderer[0]),
join_paths(meson.current_source_dir(), 'compare', test + '.node'),
join_paths(meson.current_source_dir(), 'compare', test + '.png'),
'--output', join_paths(meson.current_build_dir(), 'compare', renderer_name),
join_paths(meson.current_source_dir(), 'compare', testname + '.node'),
join_paths(meson.current_source_dir(), 'compare', testname + '.png'),
],
env: [
'GSK_RENDERER=' + renderer[0],
'GSK_RENDERER=' + renderer_name,
'GTK_A11Y=test',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
],
suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer[0], 'gsk-compare-' + renderer[0] ],
suite: suites,
)
endif
endforeach