[poppler] .gitlab-ci.yml

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Sep 30 20:45:21 UTC 2018


 .gitlab-ci.yml |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 80a2aa1ba039947f5c4e87a1ad7b5aa324d96407
Author: Adam Reichold <adam.reichold at t-online.de>
Date:   Sun Sep 30 16:51:32 2018 +0200

    Use git clone instead of and a relative CI project path to allow MR to modify the test repository.

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57f1c1a5..92ec152e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@ before_script:
   - echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
   - apt-get update
   - apt-get build-dep --yes --no-install-recommends poppler
-  - apt-get install --yes --no-install-recommends ninja-build libcurl4-openssl-dev curl ca-certificates locales libc++-dev libc++abi-dev clang
+  - apt-get install --yes --no-install-recommends ninja-build libcurl4-openssl-dev git ca-certificates locales libc++-dev libc++abi-dev clang
   - echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
   - locale-gen
 
@@ -12,6 +12,8 @@ variables:
   LANG: en_US.UTF-8
   LANGUAGE: en_US:en
   LC_ALL: en_US.UTF-8
+  TEST_DATA_URL: https://gitlab.freedesktop.org/${CI_PROJECT_NAMESPACE}/test.git
+  UPSTREAM_TEST_DATA_URL: https://@gitlab.freedesktop.org/poppler/test.git
 
 cache:
   key: "$CI_BUILD_NAME"
@@ -21,18 +23,18 @@ cache:
 build:
   stage: build
   script:
+    - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
     - mkdir -p build && cd build
-    - curl https://gitlab.freedesktop.org/poppler/test/-/archive/master/test-master.tar.gz | tar xz
-    - cmake -G Ninja -DTESTDATADIR=$PWD/test-master ..
+    - cmake -G Ninja -DTESTDATADIR=$PWD/../test-data ..
     - ninja
     - ctest --output-on-failure
 
 build_clang_libcpp:
   stage: build
   script:
+    - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
     - mkdir -p build && cd build
-    - curl https://gitlab.freedesktop.org/poppler/test/-/archive/master/test-master.tar.gz | tar xz
-    - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/test-master ..
+    - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data ..
     - ninja
     - ctest --output-on-failure
 


More information about the poppler mailing list