summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2021-01-04 00:59:15 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2021-01-04 00:59:15 +0000
commit7ccbdf549978d4cadd71986b673a5084879475ba (patch)
tree8ed87e44d67b0c39f57b87f01587706ba2472ae0
parentf3c485373ce8066e85b20abb76cb722e945f23fd (diff)
parent048938a62a9612ac6ad860ad55e554aec69a1fff (diff)
downloadgdk-pixbuf-7ccbdf549978d4cadd71986b673a5084879475ba.tar.gz
Merge branch 'macos-ci' into 'master'
Macos ci See merge request GNOME/gdk-pixbuf!98
-rw-r--r--.gitlab-ci.yml20
-rw-r--r--build-aux/gen-resources.py9
-rw-r--r--meson.build5
-rw-r--r--subprojects/glib.wrap1
-rw-r--r--tests/meson.build2
5 files changed, 35 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index feb322082..ec1d34663 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -53,6 +53,26 @@ meson-fedora-x86_64:
image: ${FEDORA_IMAGE}
needs: []
+macos:
+ stage: build
+ needs: []
+ only:
+ - master
+ - merge_requests
+ tags:
+ - macos
+ before_script:
+ - pip3 install --user meson==0.56
+ - pip3 install --user ninja
+ - export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
+ script:
+ - meson setup -Dintrospection=disabled -Dinstalled_tests=false -Dman=false -Dgtk_doc=false _build
+ - meson compile -C_build
+ artifacts:
+ when: always
+ paths:
+ - "${CI_PROJECT_DIR}/_build/meson-logs"
+
release-build:
stage: build
extends: .build-linux
diff --git a/build-aux/gen-resources.py b/build-aux/gen-resources.py
index 3f790b6c9..4bf507efc 100644
--- a/build-aux/gen-resources.py
+++ b/build-aux/gen-resources.py
@@ -8,6 +8,7 @@ import argparse
import os
argparser = argparse.ArgumentParser(description='Compile resources')
+argparser.add_argument('--glib-compile-resources', metavar='PATH', help='Path to glib-compile-resources')
argparser.add_argument('--pixdata', metavar='PATH', help='Path to gdk-pixbuf-pixdata')
argparser.add_argument('--loaders', metavar='PATH', help='Path to the loaders.cache file')
argparser.add_argument('--sourcedir', metavar='PATH', help='Path to the source directory')
@@ -20,7 +21,13 @@ group.add_argument('--source', help='Generate source file', action='store_true')
args = argparser.parse_args()
-cmd = ['glib-compile-resources']
+cmd = []
+
+if args.glib_compile_resources:
+ cmd += [args.glib_compile_resources]
+else:
+ cmd += ['glib-compile-resources']
+
if args.header:
cmd += ['--generate-header']
else:
diff --git a/meson.build b/meson.build
index 7c44860a5..1cef125a3 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@ project('gdk-pixbuf', 'c',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
- 'c_std=c99',
+ 'c_std=gnu99',
],
meson_version: '>= 0.55.3')
@@ -371,6 +371,9 @@ gen_resources = find_program('build-aux/gen-resources.py')
gen_installed_test = find_program('build-aux/gen-installed-test.py')
gen_thumbnailer = find_program('build-aux/gen-thumbnailer.py')
+# Needed by gen-resources.py
+glib_compile_resources = find_program('glib-compile-resources')
+
gnome = import('gnome')
subdir('gdk-pixbuf')
diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap
index 87021ae4d..0f72dc280 100644
--- a/subprojects/glib.wrap
+++ b/subprojects/glib.wrap
@@ -3,3 +3,4 @@ directory=glib
url=https://gitlab.gnome.org/GNOME/glib.git
push-url=git@gitlab.gnome.org:GNOME/glib.git
revision=master
+depth=1
diff --git a/tests/meson.build b/tests/meson.build
index ab7ff1eee..8475f5f5c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -9,6 +9,7 @@ if enabled_loaders.contains('png')
output: 'resources.c',
command: [
gen_resources,
+ '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
'--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
'--loaders=@0@'.format(loaders_cache.full_path()),
'--sourcedir=@0@'.format(meson.current_source_dir()),
@@ -27,6 +28,7 @@ if enabled_loaders.contains('png')
output: 'resources.h',
command: [
gen_resources,
+ '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
'--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
'--loaders=@0@'.format(loaders_cache.full_path()),
'--sourcedir=@0@'.format(meson.current_source_dir()),