[pitivi/sdk] x
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/sdk] x
- Date: Mon, 7 Dec 2020 22:51:34 +0000 (UTC)
commit 5a64f4515d3e175f6eb4766d7fda628476b94679
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Dec 7 23:51:26 2020 +0100
x
.gitlab-ci.yml | 32 ++++++++++++--------------------
runner | 12 ++++++++++++
2 files changed, 24 insertions(+), 20 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index db41a59ed..45af47d05 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,27 +15,19 @@ pitivi:master:
stage: tests_runner_image
image: registry.gitlab.gnome.org/infrastructure/docker/buildah:latest
script:
+ - export FLATPAK_BUILDER_CACHE="--state-dir=${HOME}/flatpak-cache"
+ - export DOCKERIMAGE="registry.gitlab.gnome.org/gnome/pitivi:master-sdk_3.38"
# https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
- env
+ - whoami
+ - pwd
+ - ls -al
- # Create a container for building the sandbox.
- - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.38"
- - podman create --name sandbox_container ${BASE_IMAGE}
- - podman start sandbox_container
-
- # Build the Pitivi flatpak sandbox in the container.
- - export DIR=/root/pitivi
- - podman exec sandbox_container git clone ${CI_PROJECT_URL}.git --single-branch ${DIR} -b
${CI_COMMIT_REF_NAME}
- - podman exec sandbox_container flatpak-builder --user --disable-rofiles-fuse ${DIR}/app
${DIR}/build/flatpak/org.pitivi.Pitivi.json --state-dir=\${HOME}/flatpak-cache --ccache
- - podman exec sandbox_container rm -rf ${DIR}
-
- # Turn the live container into a local image.
- - export IMAGE="registry.gitlab.gnome.org/gnome/pitivi:master-sdk_3.38"
- - podman commit sandbox_container ${IMAGE}
-
- # Upload the image.
- - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- - podman push ${IMAGE}
+ # Create an image with the flatpak cache populated.
+ # This allows rebuilding the sandbox quickly when running the tests.
+ - buildah login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
+ - buildah bud --isolation=chroot -f ./runner -t ${DOCKERIMAGE} ${DIR}
+ - buildah push ${DOCKERIMAGE}
only:
- triggers
- schedules
@@ -51,7 +43,7 @@ build:
BLACKLIST: >
-b tests.test_effects.EffectsPropertiesManagerTest.test_dependent_properties
script:
- - export BUILDDIR=${HOME}/pitivi
+ - export BUILDDIR=${HOME}/pitivi.git
- export MANIFEST=${BUILDDIR}/build/flatpak/org.pitivi.Pitivi.json
- export RUN_IN_SANDBOX="flatpak-builder --disable-rofiles-fuse --filesystem=${BUILDDIR}
--filesystem=${CI_PROJECT_DIR} --env=PITIVI_DEVELOPMENT=1 --env=GST_DEBUG=2 --env=GST_DEBUG_NO_COLOR=true
--run app ${MANIFEST}"
- export FLATPAK_BUILDER_CACHE="--state-dir=${HOME}/flatpak-cache"
@@ -68,7 +60,7 @@ build:
- flatpak-builder --user --disable-rofiles-fuse ${FLATPAK_BUILDER_CACHE} --disable-download --ccache
--repo=${FLATPAK_REPO} --force-clean app build/flatpak/org.pitivi.Pitivi.json --subject="Rolling update for
pitivi master" --body="See ${CI_JOB_URL}"
- ${RUN_IN_SANDBOX} meson mesonbuild/
- ${RUN_IN_SANDBOX} ninja -C mesonbuild/
- - xvfb-run -n 32 -s "-screen 0 640x480x24" ${RUN_IN_SANDBOX} gst-validate-launcher
$PWD/tests/ptv_testsuite.py --dump-on-failure --timeout-factor 4 --xunit-file ${XUNIT_PATH}
--logs-dir=${CI_PROJECT_DIR}/tests-logs ${BLACKLIST}
+ - xvfb-run -n 32 -s "-screen 0 640x480x24" ${RUN_IN_SANDBOX} gst-validate-launcher
${PWD}/tests/ptv_testsuite.py --dump-on-failure --timeout-factor 4 --xunit-file ${XUNIT_PATH}
--logs-dir=${CI_PROJECT_DIR}/tests-logs ${BLACKLIST}
# For some reason GitLab fails to upload directories
- cd ${CI_PROJECT_DIR}/
diff --git a/runner b/runner
new file mode 100644
index 000000000..694e02b82
--- /dev/null
+++ b/runner
@@ -0,0 +1,12 @@
+FROM registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.38
+
+# This is just a temporary directory. It will be deleted at the end.
+ENV DIR=${HOME}/pitivi.git
+
+RUN git clone ${CI_PROJECT_URL}.git ${DIR} --single-branch -b ${CI_COMMIT_REF_NAME}
+
+# Create the flatpak sandbox
+RUN flatpak-builder --user --disable-rofiles-fuse ${DIR}/app ${DIR}/build/flatpak/org.pitivi.Pitivi.json
${FLATPAK_BUILDER_CACHE} --ccache
+
+# We're only interested in the flatpak cache being populated.
+RUN rm -rf ${DIR}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]