summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Kelly <ctk21@cl.cam.ac.uk>2021-03-05 12:09:54 +0000
committerTom Kelly <ctk21@cl.cam.ac.uk>2021-03-05 12:09:54 +0000
commit1e34acbe2c826c3b31be757002800f4741def486 (patch)
treeafb2e65aacf3886e5347453b05c4ff5d3e503858 /tools
parentf72387096692b6b2f016c15bc7313104aac64891 (diff)
parentd9a3ad413f9567c418cf7809a110fac5fcd36f6c (diff)
downloadocaml-1e34acbe2c826c3b31be757002800f4741def486.tar.gz
Merge commit 'd9a3ad413f9567c418cf7809a110fac5fcd36f6c' into parallel_minor_gc_4_12
Diffstat (limited to 'tools')
-rw-r--r--tools/ci/inria/README.md13
-rw-r--r--tools/ci/inria/Risc-V/Jenkinsfile42
-rw-r--r--tools/ci/inria/bootstrap/Jenkinsfile43
-rw-r--r--tools/ci/inria/bootstrap/remove-sinh-primitive.patch (renamed from tools/ci/inria/remove-sinh-primitive.patch)0
-rwxr-xr-xtools/ci/inria/bootstrap/script (renamed from tools/ci/inria/bootstrap)2
-rw-r--r--tools/ci/inria/check-typo/Jenkinsfile47
-rw-r--r--tools/ci/inria/dune-build/Jenkinsfile41
-rwxr-xr-xtools/ci/inria/dune-build/script (renamed from tools/ci/inria/dune-build)0
-rw-r--r--tools/ci/inria/other-configs/Jenkinsfile43
-rwxr-xr-xtools/ci/inria/other-configs/script (renamed from tools/ci/inria/other-configs)0
-rw-r--r--tools/ci/inria/sanitizers/Jenkinsfile41
-rw-r--r--tools/ci/inria/sanitizers/lsan-suppr.txt (renamed from tools/ci/inria/lsan-suppr.txt)0
-rwxr-xr-xtools/ci/inria/sanitizers/script (renamed from tools/ci/inria/extra-checks)88
-rw-r--r--tools/ci/inria/step-by-step-build/Jenkinsfile45
-rwxr-xr-xtools/ci/inria/step-by-step-build/script25
15 files changed, 344 insertions, 86 deletions
diff --git a/tools/ci/inria/README.md b/tools/ci/inria/README.md
new file mode 100644
index 0000000000..8ade11237f
--- /dev/null
+++ b/tools/ci/inria/README.md
@@ -0,0 +1,13 @@
+This directory contains the configuration files of the Jenkins jobs
+used to test OCaml on Inria's continuous integration infrastructure.
+
+Each subdirectory under `tools/ci/inria` corresponds to one CI job
+and should contain at least a `Jenkinsfile` describing the pipeline
+associated with this job(1). In addition, the job's directory can also
+contain a `script` file specifying the commands used to actually execute
+the job. Other files may be included as appropriate.
+
+(1) The Jenkinsfiles can follow either the declarative syntax documented
+at https://www.jenkins.io/doc/book/pipeline/syntax, or the advanced
+(scripted) one documented at
+https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#advanced-scripted-pipeline
diff --git a/tools/ci/inria/Risc-V/Jenkinsfile b/tools/ci/inria/Risc-V/Jenkinsfile
new file mode 100644
index 0000000000..4221adc373
--- /dev/null
+++ b/tools/ci/inria/Risc-V/Jenkinsfile
@@ -0,0 +1,42 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the Risc-V job on Inria's CI */
+
+pipeline {
+ agent { label 'olive' }
+ stages {
+ stage('Verifying that OCaml commpiles on a Risc-V virtual machine') {
+ steps {
+ sh 'ssh -p 10000 riscv@localhost GIT_COMMIT=${GIT_COMMIT} ' +
+ 'flambda=false /home/riscv/run-ci'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/bootstrap/Jenkinsfile b/tools/ci/inria/bootstrap/Jenkinsfile
new file mode 100644
index 0000000000..4f1f5a98c4
--- /dev/null
+++ b/tools/ci/inria/bootstrap/Jenkinsfile
@@ -0,0 +1,43 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the bootstrap job on Inria's CI */
+
+/* Make sure the OCaml compiler can still be bootstrapped */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage('Verifying that the OCaml compiler can be bootstrapped') {
+ steps {
+ sh 'tools/ci/inria/bootstrap/script'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/remove-sinh-primitive.patch b/tools/ci/inria/bootstrap/remove-sinh-primitive.patch
index db9dfe83b9..db9dfe83b9 100644
--- a/tools/ci/inria/remove-sinh-primitive.patch
+++ b/tools/ci/inria/bootstrap/remove-sinh-primitive.patch
diff --git a/tools/ci/inria/bootstrap b/tools/ci/inria/bootstrap/script
index 382aa03882..2169fc75be 100755
--- a/tools/ci/inria/bootstrap
+++ b/tools/ci/inria/bootstrap/script
@@ -74,7 +74,7 @@ change_exe_magic_number() {
remove_primitive()
{
echo Removing the \'sinh\' primitive
- patch -p1 < tools/ci/inria/remove-sinh-primitive.patch
+ patch -p1 < tools/ci/inria/bootstrap/remove-sinh-primitive.patch
}
#########################################################################
diff --git a/tools/ci/inria/check-typo/Jenkinsfile b/tools/ci/inria/check-typo/Jenkinsfile
new file mode 100644
index 0000000000..5ad6c9b20d
--- /dev/null
+++ b/tools/ci/inria/check-typo/Jenkinsfile
@@ -0,0 +1,47 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the check-typo job on Inria's CI */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage('Checking code style') {
+ steps {
+ sh '''
+ if [ ! -x tools/check-typo ] ; then
+ echo "tools/check-typo does not appear to be executable?"; >2;
+ exit 1;
+ fi
+ tools/check-typo
+ '''
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/dune-build/Jenkinsfile b/tools/ci/inria/dune-build/Jenkinsfile
new file mode 100644
index 0000000000..a53a641b43
--- /dev/null
+++ b/tools/ci/inria/dune-build/Jenkinsfile
@@ -0,0 +1,41 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the dune-build job on Inria's CI */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage('Building the OCaml compiler with Dune') {
+ steps {
+ sh 'tools/ci/inria/dune-build/script'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'Sebastien.Hinderer@inria.fr, thomas.refis@gmail.com',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/dune-build b/tools/ci/inria/dune-build/script
index 6c95220a3e..6c95220a3e 100755
--- a/tools/ci/inria/dune-build
+++ b/tools/ci/inria/dune-build/script
diff --git a/tools/ci/inria/other-configs/Jenkinsfile b/tools/ci/inria/other-configs/Jenkinsfile
new file mode 100644
index 0000000000..75b8f6009c
--- /dev/null
+++ b/tools/ci/inria/other-configs/Jenkinsfile
@@ -0,0 +1,43 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the other-configs job on Inria's CI */
+
+/* Test various other compiler configurations */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage('Testing various other compiler configurations') {
+ steps {
+ sh 'tools/ci/inria/other-configs/script'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/other-configs b/tools/ci/inria/other-configs/script
index 7ec331d75a..7ec331d75a 100755
--- a/tools/ci/inria/other-configs
+++ b/tools/ci/inria/other-configs/script
diff --git a/tools/ci/inria/sanitizers/Jenkinsfile b/tools/ci/inria/sanitizers/Jenkinsfile
new file mode 100644
index 0000000000..7add2f2f2e
--- /dev/null
+++ b/tools/ci/inria/sanitizers/Jenkinsfile
@@ -0,0 +1,41 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the sanitizers job on Inria's CI */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage('Compiling and testing OCaml with sanitizers') {
+ steps {
+ sh 'tools/ci/inria/sanitizers/script'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/lsan-suppr.txt b/tools/ci/inria/sanitizers/lsan-suppr.txt
index 160e7fc68b..160e7fc68b 100644
--- a/tools/ci/inria/lsan-suppr.txt
+++ b/tools/ci/inria/sanitizers/lsan-suppr.txt
diff --git a/tools/ci/inria/extra-checks b/tools/ci/inria/sanitizers/script
index fc929d46d6..5f8e5b6e7a 100755
--- a/tools/ci/inria/extra-checks
+++ b/tools/ci/inria/sanitizers/script
@@ -24,29 +24,8 @@
export OCAMLTEST_SKIP_TESTS="tests/afl-instrumentation/afltest.ml \
tests/runtime-errors/stackoverflow.ml"
-# To know the slave's architecture, this script looks at the OCAML_ARCH
-# environment variable. For a given node NODE, this variable can be defined
-# in Jenkins at the following address:
-# https://ci.inria.fr/ocaml/computer/NODE/configure
-
-# Other environment variables that are honored:
-# OCAML_JOBS number of jobs to run in parallel (make -j)
-
-# Command-line arguments:
-# -jNN pass "-jNN" option to make for parallel builds
-
-error () {
- echo "$1" >&2
- exit 3
-}
-
-arch_error() {
- configure_url="https://ci.inria.fr/ocaml/computer/${NODE_NAME}/configure"
- msg="Unknown architecture. Make sure the OCAML_ARCH environment"
- msg="$msg variable has been defined."
- msg="$msg\nSee ${configure_url}"
- error "$msg"
-}
+jobs=-j8
+make=make
#########################################################################
@@ -56,39 +35,6 @@ set -x
# stop on error
set -e
-# be considerate towards other potential users of the test machine
-case "${OCAML_ARCH}" in
- bsd|macos|linux) renice 10 $$ ;;
-esac
-
-# set up variables
-
-make=make
-jobs=''
-
-case "${OCAML_ARCH}" in
- bsd) make=gmake ;;
- macos) ;;
- linux) ;;
- cygwin|cygwin64|mingw|mingw64|msvc|msvc64)
- error "Don't run this test under Windows";;
- *) arch_error;;
-esac
-
-case "${OCAML_JOBS}" in
- [1-9]|[1-9][0-9]) jobs="-j${OCAML_JOBS}" ;;
-esac
-
-# parse optional command-line arguments
-
-while [ $# -gt 0 ]; do
- case $1 in
- -j[1-9]|-j[1-9][0-9]) jobs="$1";;
- *) error "unknown option $1";;
- esac
- shift
-done
-
# Tell gcc to use only ASCII in its diagnostic outputs.
export LC_ALL=C
@@ -108,34 +54,6 @@ export TSAN_SYMBOLIZER_PATH="$ASAN_SYMBOLIZER_PATH"
#########################################################################
-# Cleanup repository
-git clean -q -f -d -x
-
-# Ensure that the repo still passes the check-typo script
-if [ ! -x tools/check-typo ] ; then
- error "tools/check-typo does not appear to be executable?"
-fi
-tools/check-typo
-
-#########################################################################
-
-echo "======== old school build =========="
-
-instdir="$HOME/ocaml-tmp-install-$$"
-./configure --prefix "$instdir" --disable-dependency-generation
-
-# Build the system without using world.opt
-make $jobs world
-make $jobs opt
-make $jobs opt.opt
-make install
-
-rm -rf "$instdir"
-
-# It's a build system test only, so we don't bother testing the compiler
-
-#########################################################################
-
echo "======== clang 9, address sanitizer, UB sanitizer =========="
git clean -q -f -d -x
@@ -172,7 +90,7 @@ sanitizers="-fsanitize=address -fsanitize-trap=$ubsan"
# 2- add an exception for ocamlyacc, which doesn't free memory
OCAMLRUNPARAM="c=1" \
-LSAN_OPTIONS="suppressions=$(pwd)/tools/ci/inria/lsan-suppr.txt" \
+LSAN_OPTIONS="suppressions=$(pwd)/tools/ci/inria/sanitizers/lsan-suppr.txt" \
make $jobs
# Run the testsuite.
diff --git a/tools/ci/inria/step-by-step-build/Jenkinsfile b/tools/ci/inria/step-by-step-build/Jenkinsfile
new file mode 100644
index 0000000000..eb020c6560
--- /dev/null
+++ b/tools/ci/inria/step-by-step-build/Jenkinsfile
@@ -0,0 +1,45 @@
+/**************************************************************************/
+/* */
+/* OCaml */
+/* */
+/* Sebastien Hinderer, INRIA Paris */
+/* */
+/* Copyright 2020 Institut National de Recherche en Informatique et */
+/* en Automatique. */
+/* */
+/* All rights reserved. This file is distributed under the terms of */
+/* the GNU Lesser General Public License version 2.1, with the */
+/* special exception on linking described in the file LICENSE. */
+/* */
+/**************************************************************************/
+
+/* Pipeline for the step-by-step-build job on Inria's CI */
+
+/* Build OCaml the legacy way (without using the world.opt target) */
+
+pipeline {
+ agent { label 'ocaml-linux-64' }
+ stages {
+ stage(
+ 'Building the OCaml compiler step by step (without using world.opt)'
+ ) {
+ steps {
+ sh 'tools/ci/inria/step-by-step-build/script'
+ }
+ }
+ }
+ post {
+ regression {
+ emailext (
+ to: 'ocaml-ci-notifications@inria.fr',
+ subject: 'Job $JOB_NAME $BUILD_STATUS (build #$BUILD_NUMBER)',
+ body: 'Changes since the last successful build:\n\n' +
+ '${CHANGES, format="%r %a %m"}\n\n' +
+ 'See the attached build log or check console output here:\n' +
+ '$BUILD_URL\n',
+ /* recipientProviders: [[$class: 'DevelopersRecipientProvider']], */
+ attachLog: true
+ )
+ }
+ }
+}
diff --git a/tools/ci/inria/step-by-step-build/script b/tools/ci/inria/step-by-step-build/script
new file mode 100755
index 0000000000..8397e68365
--- /dev/null
+++ b/tools/ci/inria/step-by-step-build/script
@@ -0,0 +1,25 @@
+#!/bin/sh
+#**************************************************************************
+#* *
+#* OCaml *
+#* *
+#* Sebastien Hinderer projet Cambium, INRIA Paris *
+#* *
+#* Copyright 2020 Institut National de Recherche en Informatique et *
+#* en Automatique. *
+#* *
+#* All rights reserved. This file is distributed under the terms of *
+#* the GNU Lesser General Public License version 2.1, with the *
+#* special exception on linking described in the file LICENSE. *
+#* *
+#**************************************************************************
+
+jobs=-j8
+instdir="$HOME/ocaml-tmp-install-$$"
+./configure --prefix "$instdir" --disable-dependency-generation
+make $jobs world
+make $jobs opt
+make $jobs opt.opt
+make install
+rm -rf "$instdir"
+# It's a build system test only, so we don't bother testing the compiler