mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
ci: Cache subprojects in docker images
This commit is contained in:
parent
8661d94c3e
commit
b077c1403e
@ -24,6 +24,11 @@ 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: $DEBIAN_IMAGE
|
image: $DEBIAN_IMAGE
|
||||||
@ -33,7 +38,7 @@ style-check-diff:
|
|||||||
- .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: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
@ -67,7 +72,7 @@ fedora-x86_64:
|
|||||||
- "_coverage"
|
- "_coverage"
|
||||||
|
|
||||||
debian-stable-x86_64:
|
debian-stable-x86_64:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: $DEBIAN_IMAGE
|
image: $DEBIAN_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -95,7 +100,7 @@ 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: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -151,7 +156,7 @@ installed-tests:
|
|||||||
- "_build/installed-tests-report/"
|
- "_build/installed-tests-report/"
|
||||||
|
|
||||||
G_DISABLE_ASSERT:
|
G_DISABLE_ASSERT:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
@ -178,7 +183,7 @@ G_DISABLE_ASSERT:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
valgrind:
|
valgrind:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
variables:
|
variables:
|
||||||
@ -211,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}"
|
||||||
@ -390,7 +395,7 @@ coverage:
|
|||||||
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
||||||
|
|
||||||
scan-build:
|
scan-build:
|
||||||
extends: .only-default
|
extends: .build
|
||||||
image: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
script:
|
script:
|
||||||
|
@ -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
|
||||||
|
@ -67,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…
Reference in New Issue
Block a user