From 2e65212798a88d01ecd34543bd29cdecbccd5905 Mon Sep 17 00:00:00 2001
From: Adrien Matta <matta@lpccaen.in2p3.fr>
Date: Tue, 3 Sep 2019 13:52:23 +0000
Subject: [PATCH] Add .gitlab-ci.yml

---
 .gitlab-ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..650580691
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,55 @@
+# Specify the docker image to use (only used if using docker runners)
+# See: http://doc.gitlab.com/ee/ci/docker/using_docker_images.html
+image: ubuntu:18.04
+
+before_script:
+   - apt-get update --yes
+   - apt-get install --yes gcc g++ cmake ninja-build libafterimage0
+   - wget -q https://root.cern.ch/download/root_v6.14.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
+   - tar -xf root_v6.14.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
+   - source ~/root/bin/thisroot.sh
+   - wget -q https://www.dropbox.com/s/8hxjkd6twdsv5fi/geant4_install_new.tar.gz
+   - tar -xf geant4_install_new.tar.gz
+   - source ~/geant4_install/share/Geant4-10.1.2/geant4make/geant4make.sh
+  artifacts:
+   paths:
+    - root
+    - geant4_install
+   expire_in: 1 hour
+   
+stages:
+  - build-NPLib
+  - build-NPSimulation
+  - test
+
+building-NPLib:
+ stage: build-NPLib
+ script:
+  - cd $NPTOOL/NPLib 
+  - cmake -GNinja ./
+  - ninja install 
+ artifacts:
+  paths:
+    - lib
+    - include
+    - bin
+  expire_in: 1 hour
+  
+building-NPSimulation:
+ stage: build-NPSimulation
+ script:
+  - cd $NPTOOL/NPSimulation 
+  - cmake -GNinja ./
+  - ninja install 
+ artifacts:
+  paths:
+    - lib
+    - include
+    - bin
+  expire_in: 1 hour
+
+testing:
+ stage: test
+ script:
+  - ./scripts/RootLogon.sh 
+  - ./scripts/test/all.sh
\ No newline at end of file
-- 
GitLab