mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-15 20:18:05 +02:00
Merge branch 'ci-nodownload' into 'master'
ci: Avoid downloading subprojects for each job See merge request GNOME/glib!388
This commit is contained in:
commit
bc77510b67
@ -10,9 +10,13 @@ cache:
|
|||||||
- _ccache/
|
- _ccache/
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v6"
|
||||||
|
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v6"
|
||||||
|
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v2"
|
||||||
|
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v2"
|
||||||
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
||||||
G_MESSAGES_DEBUG: all
|
G_MESSAGES_DEBUG: all
|
||||||
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings --wrap-mode=nodownload"
|
||||||
|
|
||||||
.only-default:
|
.only-default:
|
||||||
only:
|
only:
|
||||||
@ -20,17 +24,22 @@ variables:
|
|||||||
except:
|
except:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
|
.build:
|
||||||
|
extends: .only-default
|
||||||
|
before_script:
|
||||||
|
- cp -r $HOME/subprojects/* subprojects/
|
||||||
|
|
||||||
style-check-diff:
|
style-check-diff:
|
||||||
extends: .only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
image: $DEBIAN_IMAGE
|
||||||
stage: style-check
|
stage: style-check
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/run-style-check-diff.sh
|
- .gitlab-ci/run-style-check-diff.sh
|
||||||
|
|
||||||
fedora-x86_64:
|
fedora-x86_64:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
||||||
@ -63,8 +72,8 @@ fedora-x86_64:
|
|||||||
- "_coverage"
|
- "_coverage"
|
||||||
|
|
||||||
debian-stable-x86_64:
|
debian-stable-x86_64:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
image: $DEBIAN_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- meson ${MESON_COMMON_OPTIONS}
|
- meson ${MESON_COMMON_OPTIONS}
|
||||||
@ -91,12 +100,9 @@ debian-stable-x86_64:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
installed-tests:
|
installed-tests:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
before_script:
|
|
||||||
# FIXME move to docker image
|
|
||||||
- sudo dnf install -y gnome-desktop-testing python3-dbusmock xdg-desktop-portal
|
|
||||||
script:
|
script:
|
||||||
# FIXME Install xdg-desktop-portal build deps before compiling glib,
|
# FIXME Install xdg-desktop-portal build deps before compiling glib,
|
||||||
# so it doesn't overwrite our own glib build
|
# so it doesn't overwrite our own glib build
|
||||||
@ -150,8 +156,8 @@ installed-tests:
|
|||||||
- "_build/installed-tests-report/"
|
- "_build/installed-tests-report/"
|
||||||
|
|
||||||
G_DISABLE_ASSERT:
|
G_DISABLE_ASSERT:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
CPPFLAGS: "-DG_DISABLE_ASSERT"
|
CPPFLAGS: "-DG_DISABLE_ASSERT"
|
||||||
@ -177,8 +183,8 @@ G_DISABLE_ASSERT:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
valgrind:
|
valgrind:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
variables:
|
variables:
|
||||||
MESON_TEST_TIMEOUT_MULTIPLIER: 10
|
MESON_TEST_TIMEOUT_MULTIPLIER: 10
|
||||||
@ -210,7 +216,7 @@ valgrind:
|
|||||||
- "_build/meson-logs"
|
- "_build/meson-logs"
|
||||||
|
|
||||||
.cross-template: &cross-template
|
.cross-template: &cross-template
|
||||||
extends: .only-default
|
extends: .build
|
||||||
stage: build
|
stage: build
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||||
@ -220,7 +226,7 @@ valgrind:
|
|||||||
|
|
||||||
cross-android_api21_arm64:
|
cross-android_api21_arm64:
|
||||||
<<: *cross-template
|
<<: *cross-template
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/android-ndk:v1
|
image: $ANDROID_IMAGE
|
||||||
script:
|
script:
|
||||||
# FIXME: add --werror
|
# FIXME: add --werror
|
||||||
# We use -Diconv=auto to test that we successfully detect that iconv is not
|
# We use -Diconv=auto to test that we successfully detect that iconv is not
|
||||||
@ -230,7 +236,7 @@ cross-android_api21_arm64:
|
|||||||
|
|
||||||
cross-android_api28_arm64:
|
cross-android_api28_arm64:
|
||||||
<<: *cross-template
|
<<: *cross-template
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/android-ndk:v1
|
image: $ANDROID_IMAGE
|
||||||
script:
|
script:
|
||||||
# FIXME: add --werror
|
# FIXME: add --werror
|
||||||
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true _build
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true _build
|
||||||
@ -238,7 +244,7 @@ cross-android_api28_arm64:
|
|||||||
|
|
||||||
cross-mingw64:
|
cross-mingw64:
|
||||||
<<: *cross-template
|
<<: *cross-template
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/mingw:v1
|
image: $MINGW_IMAGE
|
||||||
script:
|
script:
|
||||||
# FIXME: Add --werror
|
# FIXME: Add --werror
|
||||||
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
|
||||||
@ -378,7 +384,7 @@ macos:
|
|||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
extends: .only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: coverage
|
stage: coverage
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||||
@ -389,8 +395,8 @@ coverage:
|
|||||||
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
||||||
|
|
||||||
scan-build:
|
scan-build:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
script:
|
script:
|
||||||
- meson ${MESON_COMMON_OPTIONS}
|
- meson ${MESON_COMMON_OPTIONS}
|
||||||
@ -421,12 +427,12 @@ pages:
|
|||||||
- public
|
- public
|
||||||
|
|
||||||
dist-job:
|
dist-job:
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
script:
|
script:
|
||||||
- meson --buildtype release --fatal-meson-warnings -Dgtk_doc=true -Dman=true _build
|
- meson ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build
|
||||||
- cd _build
|
- cd _build
|
||||||
- ninja dist
|
- ninja dist
|
||||||
- ninja glib-doc gobject-doc gio-doc
|
- ninja glib-doc gobject-doc gio-doc
|
||||||
|
@ -72,4 +72,7 @@ RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
|||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
COPY cache-subprojects.sh .
|
||||||
|
RUN ./cache-subprojects.sh
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
9
.gitlab-ci/cache-subprojects.sh
Executable file
9
.gitlab-ci/cache-subprojects.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
git clone https://gitlab.gnome.org/GNOME/glib.git
|
||||||
|
meson subprojects download --sourcedir glib
|
||||||
|
rm glib/subprojects/*.wrap
|
||||||
|
mv glib/subprojects/ .
|
||||||
|
rm -rf glib
|
@ -72,4 +72,7 @@ RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
|||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
COPY cache-subprojects.sh .
|
||||||
|
RUN ./cache-subprojects.sh
|
||||||
|
|
||||||
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
||||||
|
@ -43,12 +43,14 @@ RUN dnf -y install \
|
|||||||
ncurses-compat-libs \
|
ncurses-compat-libs \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
pcre-devel \
|
pcre-devel \
|
||||||
|
python3-dbusmock \
|
||||||
python3-wheel \
|
python3-wheel \
|
||||||
shared-mime-info \
|
shared-mime-info \
|
||||||
systemtap-sdt-devel \
|
systemtap-sdt-devel \
|
||||||
unzip \
|
unzip \
|
||||||
valgrind \
|
valgrind \
|
||||||
wget \
|
wget \
|
||||||
|
xdg-desktop-portal \
|
||||||
xz \
|
xz \
|
||||||
zlib-devel \
|
zlib-devel \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
@ -65,4 +67,7 @@ RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
|
|||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
COPY cache-subprojects.sh .
|
||||||
|
RUN ./cache-subprojects.sh
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
@ -67,4 +67,7 @@ RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
|||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
COPY cache-subprojects.sh .
|
||||||
|
RUN ./cache-subprojects.sh
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user