aboutsummaryrefslogtreecommitdiff
path: root/tcwg-llvm-precommit.yaml
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-05-28 13:27:35 +0100
committerRenato Golin <renato.golin@linaro.org>2017-05-30 09:56:06 +0100
commitbdbe555e4a53aa4c51a8ad7c132d7f18ddb98dc3 (patch)
tree5c6e1da9aa810465fc8e30235c39ece6f4b27391 /tcwg-llvm-precommit.yaml
parent38846381f1cc75310b319e712861bc7f6e613850 (diff)
tcwg-llvm-precommit.yaml: New job
This is the first attempt at a pre-commit job. For now, we're only building the branch, on all targets at once, with limited options. The next step is to find the last revision of all projects in that branch and start a second build, on master, at that revision, as a baseline. Needs https://review.linaro.org/19818 Change-Id: I0edb3d24ce51a8dfb3017862276755b21593e793
Diffstat (limited to 'tcwg-llvm-precommit.yaml')
-rw-r--r--tcwg-llvm-precommit.yaml127
1 files changed, 127 insertions, 0 deletions
diff --git a/tcwg-llvm-precommit.yaml b/tcwg-llvm-precommit.yaml
new file mode 100644
index 0000000000..d619b000ac
--- /dev/null
+++ b/tcwg-llvm-precommit.yaml
@@ -0,0 +1,127 @@
+- job:
+ name: tcwg-llvm-precommit
+ project-type: matrix
+ defaults: global
+ properties:
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ linaro:
+ - job-build
+ - job-cancel
+ - build-discarder:
+ days-to-keep: 10
+ num-to-keep: 10
+ parameters:
+ - choice:
+ name: build_type
+ choices:
+ - Release
+ - RelWithDebInfo
+ - Debug
+ - MinSizeRel
+ default: 'Release'
+ description: 'Release, RelWithDebInfo, Debug, MinSizeRel'
+ - string:
+ name: cmake_flags
+ default: ''
+ description: 'Additional CMake flags, ex. CMAKE_CXX_FLAGS, etc.'
+ - bool:
+ name: twostage
+ default: false
+ description: 'Whether or not to trigger a second stage with this build.'
+ - bool:
+ name: testsuite
+ default: false
+ description: 'Whether or not to trigger a test-suite with this build.'
+ - choice:
+ name: compiler
+ choices:
+ - clang
+ - gcc
+ default: 'clang'
+ description: 'Override the default system compiler.'
+ - string:
+ name: branch
+ default: ''
+ description: 'Which branch to validate (should not be master).'
+ disabled: false
+ node: tcwg-coordinator
+ retry-count: 3
+ concurrent: true
+ display-name: 'TCWG LLVM Pre-Commit'
+ scm:
+ - git:
+ url: http://git-us.linaro.org/toolchain/jenkins-scripts.git
+ refspec: +refs/heads/master:refs/remotes/origin/master
+ name: origin
+ branches:
+ - refs/heads/master
+ skip-tag: true
+ shallow-clone: true
+ wipe-workspace: true
+ axes:
+ - axis:
+ type: slave
+ name: label
+ values:
+ - tcwg-x86_64-cam
+ - tcwg-tk1_32-build
+ - tcwg-apm_64-build
+ execution-strategy:
+ sequential: false
+ wrappers:
+ - timeout:
+ timeout: 300
+ - timestamps
+ - ssh-agent-credentials:
+ # tcwg-buildslave user id
+ users:
+ - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
+ - build-name:
+ name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -ex
+
+ # We should not need to pre-commit validate master/empty
+ if [ "${branch:+set}" != "set" ] || [ "${branch}" = "master" ] then
+ echo "ERROR: Branch not set or set to master. Cannot validate."
+ exit 1
+ fi
+
+ # Default values, only add them to parameters if really needed
+ repository="https://git-us.linaro.org/toolchain/llvm"
+ build_container_tag="xenial"
+
+ # Find projects from branch
+ . "${workspace}/tcwg-llvm-common.sh"
+ projects="$(list_branch_projects ${branch})"
+
+ # TODO: Find revision, to start the base job on master
+
+ # Setup job parameters (in staged build order)
+ cat << EOF > llvm.params.precommit
+ build_type="${build_type}"
+ cmake_flags="${cmake_flags}"
+ build_container_tag="${build_container_tag}"
+ twostage="${twostage}"
+ testsuite="${testsuite}"
+ compiler="${compiler}"
+ repository="${repository}"
+ projects="${projects}"
+ branch="${branch}"
+ target_list="${label}"
+ EOF
+
+ - conditional-step:
+ condition-kind: file-exists
+ condition-filename: llvm.params.precommit
+ steps:
+ - trigger-builds:
+ - project: 'tcwg-llvm-staged-build'
+ property-file: llvm.params.precommit
+ current-parameters: true
+ block: true