diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-03-24 14:19:40 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-03-29 19:03:25 +0100 |
commit | 45141eb63a6c8ac88cc02cfbdb2944705740bf00 (patch) | |
tree | 33517601c36ed8ed0a5210bc58f5ddd5cc99241b /tcwg-llvm-testsuite.yaml | |
parent | 80a2f3549dcd4ce0e5ebe05c73b8d273536e0670 (diff) |
tcwg-llvm-testsuite.yaml: New job. A way to run LLVM test-suite
The requirement is just the toolchain (not built here). This can be
chained to any other release/stage1/stage2 builds, even GCC.
Change-Id: Id155a92ed60928fbaf82ab73f9ebcc74bb0b6920
Diffstat (limited to 'tcwg-llvm-testsuite.yaml')
-rw-r--r-- | tcwg-llvm-testsuite.yaml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/tcwg-llvm-testsuite.yaml b/tcwg-llvm-testsuite.yaml new file mode 100644 index 0000000000..479b99992b --- /dev/null +++ b/tcwg-llvm-testsuite.yaml @@ -0,0 +1,78 @@ +- job: + name: tcwg-llvm-build + project-type: freestyle + 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: + - string: + name: toolchain + default: '' + description: 'URL of the toolchain to use. This needs to be a tarball with a /bin directory inside with either GCC or LLVM from make install' + - string: + name: build_container_tag + default: 'xenial' + description: 'Type of image to use in the container: trusty, xenial.' + disabled: false + node: tcwg-x86_64-build + retry-count: 3 + concurrent: true + display-name: 'TCWG LLVM Build' + scm: + - git: + url: http://git.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 + wrappers: + - timeout: + timeout: 300 + - timestamps + - build-name: + name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}' + builders: + - shell: | + #!/bin/bash + set -exu + if [ "${toolchain:+set}" != "set" ]; then + echo "Test-suite needs a toolchain to test" + exit 1 + fi + + # Start build container + builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME) + builder_arch=amd64 + bash ${WORKSPACE}/start-container-docker.sh --arch ${builder_arch} --distro ${build_container_tag} --session-host ${builder} > build-container.sh + + # Define CONTAINER, CONTAINER_CLEANUP, session_host and session_port + . ./build-container.sh + BUILD_CONTAINER="${CONTAINER}" + BUILD_CONTAINER_CLEANUP="${CONTAINER_CLEANUP}" + + # Make sure to cleanup build container if something goes + # wrong when preparing the test environment + if [ "${BUILD_CONTAINER_CLEANUP:+set}" = "set" ]; then + CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}" + if [ "${SSH_AGENT_CLEANUP:+set}" != "set" ]; then + trap "${CONTAINERS_CLEANUP}" EXIT + else + trap "${CONTAINERS_CLEANUP} ; eval \`${SSH_AGENT_CLEANUP}\`" EXIT + fi + fi + + ${BUILD_CONTAINER} "bash -x ${WORKSPACE}/tcwg-llvm-testsuite.sh \ + --toolchain=${TOOLCHAIN} \ + --workspace=${WORKSPACE}" |