Browse Source

Merge branch 'glci' into dev

'glci' stands for Gitlab CI
This branch was used to set up Continuous Integration (CI) with Gitlab
Leo 9 years ago
parent
commit
623e958b14
4 changed files with 49 additions and 1 deletions
  1. 15 0
      .gitlab-ci.yml
  2. 1 0
      CHANGELOG.md
  3. 32 0
      gitlab-ci.sh
  4. 1 1
      opam

+ 15 - 0
.gitlab-ci.yml

@@ -0,0 +1,15 @@
+before_script:
+  - apt-get update -qq && apt-get install -y -qq opam ocaml ocaml-native-compilers
+  - opam --version
+
+# OCaml version of the ci runner, i.e. from the system
+ocaml_sys:
+  script: "./gitlab-ci.sh system"
+
+# OCaml version 4.02
+ocaml_402:
+  script: "./gitlab-ci.sh 4.02.3"
+
+# OCaml version 4.03
+ocaml_403:
+  script: "./gitlab-ci.sh 4.03.0+beta2"

+ 1 - 0
CHANGELOG.md

@@ -66,6 +66,7 @@ This version introduce major changes in the tmp and rc file.
    release source-code, binaries, signing, run test…). Stripped (and thus smaller)
    binaries are being tested too. Add *indentation script* too.
  + Improve README.md file, using special code in \_oasis Description field.
+ + Using Gitlab CI to build with several versions of the compiler.
 
 ## 0.2.x
 

+ 32 - 0
gitlab-ci.sh

@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Give OCaml version as first argument
+
+# Inspired by https://github.com/ocaml/ocaml-ci-scripts
+
+# Use -y with evry opam command
+export OPAMYES=true
+# Installing opam
+opam init --comp="$1"
+eval `opam config env`
+
+# Versions
+echo "= Versions ="
+echo "opam --version"
+opam --version
+echo "opam --git-version"
+opam --git-version
+echo "ocaml -version"
+ocaml -version
+echo "============"
+
+# ocamlfind is mandatory to build
+opam install ocamlfind
+# XXX Manually install development dependancies, not yet supported (ait opam 1.3)
+opam install alcotest oUnit
+
+# Installing dependancies and testing installation
+opam pin add oclaunch-ci .
+# Building OcLaunch and running tests
+./configure --enable-tests
+make test

+ 1 - 1
opam

@@ -11,7 +11,7 @@ build: [
   ["./configure" "--prefix=%{prefix}%"]
   [make]
 ]
-available: [ ocaml-version >= "4.01.0"]
+available: [ ocaml-version >= "4.02.0"]
 install: [make "install"]
 remove: ["ocamlfind" "remove" "ocl"]
 depends: [