From 496df70c82ae9a479f330dc41c1ea1e7e6a93c52 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Fri, 12 Aug 2016 14:50:58 +0200
Subject: [PATCH] [ci] Defer uploading to scripts which are downloaded

---
 .gitlab-ci.yml | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fd1255..a767f5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,7 +52,7 @@ variables:
   variables: &linux_build_variables
     <<: *build_variables
     CONDA_FOLDER: "/local/conda"
-    CFLAGS: "-coverage"
+    CFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage"
     CXXFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage"
 
 
@@ -64,7 +64,7 @@ variables:
     CONDA_FOLDER: "/opt/conda"
     MACOSX_DEPLOYMENT_TARGET: "10.9"
     CFLAGS: "-pthread -coverage"
-    CXXFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -pthread -coverage"
+    CXXFLAGS: "-pthread -coverage"
 
 
 # Template for the test stage - re-install from uploaded wheels
@@ -94,8 +94,11 @@ variables:
   only:
     - master
     - tags
+  before_script:
+    - curl --silent https://gitlab.idiap.ch/bob/bob/snippets/8/raw | tr -d '\r' > upload-wheel.sh
+    - chmod 755 upload-wheel.sh
   script:
-    - curl --silent --insecure --upload-file dist/*.whl https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/wheels-upload/gitlab/
+    - ./upload-wheel.sh
 
 
 # Template for (latest) documentation upload stage
@@ -104,16 +107,11 @@ variables:
   stage: docs
   only:
     - master
+  before_script:
+    - curl --silent https://gitlab.idiap.ch/bob/bob/snippets/9/raw | tr -d '\r' > upload-sphinx.sh
+    - chmod 755 upload-sphinx.sh
   script:
-    - echo "repo=${CI_PROJECT_PATH}" > sphinx/.gitlab-ci.info
-    - echo "branch=${CI_BUILD_REF_NAME}" >> sphinx/.gitlab-ci.info
-    - echo "tag=${CI_BUILD_TAG}" >> sphinx/.gitlab-ci.info
-    - echo "build=${CI_BUILD_ID}" >> sphinx/.gitlab-ci.info
-    - echo "commit=${CI_BUILD_REF}" >> sphinx/.gitlab-ci.info
-    - echo "runner=${CI_RUNNER_DESCRIPTION}" >> sphinx/.gitlab-ci.info
-    - tar cfj ${CI_PROJECT_NAME}-${CI_BUILD_REF}.tar.bz2 sphinx
-    - curl --silent --insecure --upload-file *.tar.bz2 https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/
-
+    - ./upload-sphinx.sh
 
 
 # 2) Package specific instructions (you may tune this if needed)
@@ -273,4 +271,4 @@ wheels_macosx_35:
   dependencies:
     - build_macosx_35
   tags:
-    - conda-macosx
+    - conda-macosx
\ No newline at end of file
-- 
GitLab