forked from compiler-explorer/infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-daily-builds.sh
More file actions
executable file
·61 lines (53 loc) · 1.71 KB
/
admin-daily-builds.sh
File metadata and controls
executable file
·61 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -exuo pipefail
finish() {
ce builder stop
}
trap finish EXIT
ce builder status
ce builder start
LOG_DIR=~/build_logs
BUILD_FAILED=0
run_on_build() {
local logdir=${LOG_DIR}/$1
mkdir -p "${logdir}"
shift
set +e
date >"${logdir}/begin"
if ! ce builder exec -- "$@" |& tee ${logdir}/log; then
BUILD_FAILED=1
echo FAILED >${logdir}/status
else
echo OK >${logdir}/status
fi
date >${logdir}/end
set -e
}
build_latest() {
local IMAGE=$1
local BUILD_NAME=$2
local COMMAND=$3
local BUILD=$4
run_on_build "${BUILD_NAME}" \
sudo docker run --rm --name "${BUILD_NAME}.build" -v/home/ubuntu/.s3cfg:/root/.s3cfg:ro -e 'LOGSPOUT=ignore' \
"compilerexplorer/${IMAGE}-builder" \
bash "${COMMAND}" "${BUILD}" s3://compiler-explorer/opt/
log_to_json ${LOG_DIR} admin
}
# llvm build is fast, so lets do it first
build_latest clang llvm build-llvm.sh trunk
build_latest gcc gcc build.sh trunk
build_latest gcc gcc_contracts build.sh lock3-contracts-trunk
build_latest gcc gcc_modules build.sh cxx-modules-trunk
build_latest gcc gcc_coroutines build.sh cxx-coroutines-trunk
build_latest gcc gcc_embed build.sh embed-trunk
build_latest gcc gcc_static_analysis build.sh static-analysis-trunk
build_latest clang clang build.sh trunk
build_latest clang clang_cppx build-cppx.sh trunk
build_latest clang clang_relocatable build-relocatable.sh trunk
build_latest clang clang_autonsdmi build-autonsdmi.sh trunk
build_latest clang clang_lifetime build-lifetime.sh trunk
build_latest clang clang_parmexpr build-parmexpr.sh trunk
build_latest clang clang_embed build-embed.sh embed-trunk
build_latest go go build.sh trunk
exit ${BUILD_FAILED}