added scripts for cmake and ninjs
This commit is contained in:
parent
cf2ca87037
commit
3d6985be5e
3 changed files with 74 additions and 7 deletions
10
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
10
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
|
@ -31,17 +31,13 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('CMake') {
|
stage('CMake') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Running CMake...'
|
sh 'llvm-premerge-checks/scripts/run_cmake.sh'
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('ninja all') {
|
|
||||||
steps {
|
|
||||||
echo 'Running ninja all..'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('ninja check-all') {
|
stage('ninja check-all') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Running ninja check-all....'
|
sh 'llvm-premerge-checks/scripts/run_ninja_check-all.sh'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
39
scripts/run_cmake.sh
Executable file
39
scripts/run_cmake.sh
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2019 Google LLC
|
||||||
|
#
|
||||||
|
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://llvm.org/LICENSE.txt
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
echo "Running CMake... ======================================"
|
||||||
|
cd ${WORKSPACE}
|
||||||
|
rm -rf build || true
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
export CC=clang-8
|
||||||
|
export CXX=clang++-8
|
||||||
|
export LD=LLD
|
||||||
|
|
||||||
|
TARGET_DIR="/mnt/nfs/results/${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||||
|
mkdir -p ${TARGET_DIR}
|
||||||
|
|
||||||
|
set +e
|
||||||
|
cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_LLD=ON \
|
||||||
|
-D LLVM_CCACHE_BUILD=ON -D LLVM_CCACHE_DIR="${CCACHE_PATH}" -D LLVM_CCACHE_MAXSIZE=20G \
|
||||||
|
-D LLVM_ENABLE_ASSERTIONS=ON -DCMAKE_CXX_FLAGS=-gmlt \
|
||||||
|
-DLLVM_LIT_ARGS="--xunit-xml-output ${WORKSPACE}/build/test-results.xml" 2>&1 | tee -a cmake-log.txt
|
||||||
|
RETURN_CODE="${PIPESTATUS[0]}"
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cp cmake-log.txt CMakeCache.txt ${TARGET_DIR}
|
||||||
|
echo "CMake completed ======================================"
|
||||||
|
exit ${RETURN_CODE}
|
32
scripts/run_ninja_check-all.sh
Executable file
32
scripts/run_ninja_check-all.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2019 Google LLC
|
||||||
|
#
|
||||||
|
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://llvm.org/LICENSE.txt
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
echo "Running check-all... ====================================="
|
||||||
|
cd ${WORKSPACE}
|
||||||
|
BUILD_ID="${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||||
|
TARGET_DIR="/mnt/nfs/results/${BUILD_ID}"
|
||||||
|
|
||||||
|
ulimit -n 8192
|
||||||
|
cd build
|
||||||
|
|
||||||
|
set +e
|
||||||
|
ninja check-all 2>&1 | tee -a ninja_check_all-log.txt
|
||||||
|
RETURN_CODE="${PIPESTATUS[0]}"
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "check-all completed ======================================"
|
||||||
|
cp ninja_check_all-log.txt ${TARGET_DIR}
|
||||||
|
exit ${RETURN_CODE}
|
Loading…
Reference in a new issue