gegl: make .gir reproducible
[gegl.git] / .gitlab-ci.yml-ignored
blobe2f7ae616bc8ec1e50179cfe1d8f52063ee44ea1
1 stages:
2   - prepare
3   - dependencies
4   - gegl
6 variables:
7   BABL_DIR: "_babl_install"
8   BABL_PREFIX: "$CI_PROJECT_DIR/$BABL_DIR"
9   CCACHE_DIR: "$CI_PROJECT_DIR/.ccache"
11 cache:
12   key: ${CI_JOB_NAME}
13   paths:
14   - .ccache
16 image: $CI_REGISTRY_IMAGE:ci-latest
18 build-image:
19   stage: prepare
20   variables:
21     GIT_STRATEGY: none
22   cache: {}
23   image:
24     name: gcr.io/kaniko-project/executor:debug
25     entrypoint: [""]
26   script:
27     - mkdir -p /kaniko/.docker
28     - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
29     - echo "FROM archlinux:base-20210214.0.15477" > Dockerfile
30     - echo "RUN pacman -Sy --noconfirm archlinux-keyring && pacman -Syu --noconfirm --ignore glibc --needed git base-devel ccache meson lcms2 gobject-introspection vala pacman-contrib && pacman -Scc " >> Dockerfile
32     - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:ci-latest --cache=true --cache-ttl=120h
34 .babl-base:
35   stage: dependencies
36   artifacts:
37     paths:
38     - $BABL_DIR
39   variables:
40     GIT_DEPTH: "5"
41     CCACHE_MAXSIZE: "32Mi"
42   before_script:
43     - pacman -Sy --noconfirm archlinux-keyring
44     - pacman -Syu --ignore glibc --noconfirm --needed git base-devel ccache meson lcms2 gobject-introspection vala
45     - git clone --depth=$GIT_DEPTH https://gitlab.gnome.org/GNOME/babl.git _babl
46     - cd _babl
47     - ccache -z
49 babl-master:
50   extends: .babl-base
51   variables:
52     GIT_STRATEGY: none
53   script:
54     - meson -Dprefix="$BABL_PREFIX" _build
55     - ninja -C _build
56     - ninja -C _build install
57     - ccache -s
59 #babl-min:
60 #  extends: .babl-base
61 #  script:
62 #    - grep babl ../meson.build | grep ">=" | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | sed 's/\./_/g' > .babl_min_version
63 #    - if [ x$(( $(cut .babl_min_version -f 3 -d _) % 2)) = x1 ] ; then touch .use_master ; fi
64 #    - test -e .use_master && git fetch
65 #    - test -e .use_master && git checkout master
66 #    - test -e .use_master || git fetch --no-tags origin "refs/tags/BABL_`cat .babl_min_version`:refs/tags/MIN_VERSION"
67 #    - test -e .use_master || git checkout MIN_VERSION
68 #    - meson -Dprefix="$BABL_PREFIX" _build
69 #    - ninja -C _build
70 #    - ninja -C _build install
71 #    - ccache -s
74 .gegl-deps:
75   artifacts:
76     paths:
77     - _build/meson-logs/*
78   before_script:
79     - pacman -Sy --noconfirm archlinux-keyring
80     - pacman -Syu --ignore glibc --noconfirm --needed
81         base-devel ccache meson
82         asciidoc
83         ffmpeg
84         gobject-introspection
85         gobject-introspection-runtime
86         jasper
87         json-glib
88         lcms2
89         libgexiv2
90         libraw
91         librsvg
92         libspiro
93         libtiff
94         luajit
95         openexr
96         poppler-glib
97         python
98         python-gobject
99         sdl2
100         suitesparse
101         vala
102     - ccache -z
104 .gegl-build:
105   stage: gegl
106   extends: .gegl-deps
107   variables:
108     GIT_DEPTH: "15"
109     CCACHE_MAXSIZE: "128Mi"
110   script:
111    # Add babl location to XDG_DATA_DIRS. .gir files are located there.
112    # Add babl location to GI_TYPELIB_PATH. Required for python tests.
113    # Add /usr/local/share:/usr/share for vapigen.
114    - export XDG_DATA_DIRS="$XDG_DATA_DIRS:$BABL_PREFIX/share:/usr/local/share/:/usr/share/"
115    - export GI_TYPELIB_PATH="$BABL_PREFIX/lib/girepository-1.0:$GI_TYPELIB_PATH"
116    - export LD_LIBRARY_PATH="$BABL_PREFIX/lib:$LD_LIBRARY_PATH"
117    - meson -Dbuildtype=$BUILD_TYPE -Dpkg_config_path=$BABL_PREFIX/lib/pkgconfig $CONFIG_OPTIONS _build
118    - ninja -C _build
119    - ccache -s
120    - meson test -C _build --print-errorlogs
122 .build-default:
123   extends: .gegl-build
124   variables:
125     BUILD_TYPE: "release"
126     CONFIG_OPTIONS: ""
128 .build-all:
129   extends: .gegl-build
130   variables:
131     BUILD_TYPE: "release"
132     CONFIG_OPTIONS: "-Dworkshop=true -Ddocs=true -Dintrospection=true"
134 .build-all-debug:
135   extends: .build-all
136   variables:
137     BUILD_TYPE: "debugoptimized"
139 #default-min-babl:
140 #  extends: .build-default
141 #  dependencies:
142 #    - babl-min
143 #  needs: ["babl-min"]
145 fullconfig-master-babl:
146   extends: .build-all
147   dependencies:
148     - babl-master
149   needs: ["babl-master"]
151 debug-fullconfig-master-babl:
152   extends: .build-all-debug
153   dependencies:
154     - babl-master
155   needs: ["babl-master"]