[Spice-devel] [spice-gtk v2 3/5] gitlab-ci: create before_script per job
Victor Toso
victortoso at redhat.com
Tue Feb 12 14:07:53 UTC 2019
From: Victor Toso <me at victortoso.com>
* On a windows job-build, we don't need to install Fedora dependencies.
This change makes only one dnf install be ran per job.
* On a meson build, we should build spice-protocol with meson too.
Moving this before_script rule to each job makes all of this clear.
So, this patch does change for fedora-meson, the build of
spice-protocol with meson and we don't (explicitly) install any of
$DEPS_FEDORA
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
.gitlab-ci.yml | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2627241..aa67ed5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,12 +17,12 @@ variables:
mingw64-gtk3 mingw64-json-glib mingw64-opus
mingw64-gstreamer1-plugins-base mingw64-gstreamer1-plugins-good
-before_script:
- - dnf install -y $DEPS_COMMON $DEPS_FEDORA
- - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
- - (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
-
fedora-autotools:
+ before_script:
+ - dnf install -y $DEPS_COMMON $DEPS_FEDORA
+ - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
+ - (cd spice-protocol && ./autogen.sh --prefix=/usr && make install)
+
script:
# Run with default options
- ./autogen.sh --enable-static
@@ -42,6 +42,12 @@ fedora-autotools:
- make check
fedora-meson:
+ before_script:
+ - dnf install -y $DEPS_COMMON $DEPS_FEDORA
+ - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
+ - meson spice-protocol _build_spice-protocol --prefix=/usr
+ - ninja -C _build_spice-protocol install
+
script:
- meson _build_default || (cat _build_default/meson-logs/meson-log.txt && exit 1)
- ninja -C _build_default
@@ -52,9 +58,12 @@ fedora-meson:
- ninja -C _build_feat_disabled test || (cat _build_feat_disabled/meson-logs/testlog.txt && exit 1)
windows-autotools:
- script:
+ before_script:
- dnf install -y $DEPS_COMMON $DEPS_MINGW
- - (cd spice-protocol && make clean && mingw64-configure --prefix=/usr && make install)
+ - git clone ${CI_REPOSITORY_URL/spice-gtk/spice-protocol}
+ - (cd spice-protocol && autoreconf -if && mingw64-configure --prefix=/usr && make install)
+
+ script:
- NOCONFIGURE=yes ./autogen.sh
- PYTHON=python3 mingw64-configure --enable-static
- make -j4
--
2.20.1
More information about the Spice-devel
mailing list