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

View File

@ -84,8 +84,6 @@ compare_render_tests = [
'repeat-texture', 'repeat-texture',
'transform-in-transform', 'transform-in-transform',
'transform-in-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 'rounded-clip-in-clip-3d', # not really 3d, but cairo fails it
] ]
@ -98,29 +96,49 @@ informative_render_tests = [
] ]
renderers = [ renderers = [
# name exclude term { 'name': 'gl' },
[ 'gl', '' ], { 'name': 'broadway', 'exclude_term': '-3d' },
[ 'broadway', '-3d' ], { 'name': 'cairo', 'exclude_term': '-3d' },
[ 'cairo', '-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 renderer : renderers
foreach test : compare_render_tests foreach testname : compare_render_tests
if ((renderer[1] == '' or not test.contains(renderer[1])) and
(renderer[0] != 'broadway' or broadway_enabled)) renderer_name = renderer.get('name')
test(renderer[0] + ' ' + test, compare_render, 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: [ args: [
'--output', join_paths(meson.current_build_dir(), 'compare', renderer[0]), '--output', join_paths(meson.current_build_dir(), 'compare', renderer_name),
join_paths(meson.current_source_dir(), 'compare', test + '.node'), join_paths(meson.current_source_dir(), 'compare', testname + '.node'),
join_paths(meson.current_source_dir(), 'compare', test + '.png'), join_paths(meson.current_source_dir(), 'compare', testname + '.png'),
], ],
env: [ env: [
'GSK_RENDERER=' + renderer[0], 'GSK_RENDERER=' + renderer_name,
'GTK_A11Y=test', 'GTK_A11Y=test',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()) 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
], ],
suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer[0], 'gsk-compare-' + renderer[0] ], suite: suites,
) )
endif endif
endforeach endforeach