forked from compiler-explorer/infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin-daily-builds.sh
executable file
·50 lines (38 loc) · 1.24 KB
/
admin-daily-builds.sh
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
#!/bin/bash
set -exuo pipefail
finish() {
ce builder stop
}
trap finish EXIT
ce builder status
ce builder start
BUILD_FAILED=0
build_cpp_libraries() {
local BUILD_NAME=librarycpp
local COMMAND=build.sh
local CONAN_PASSWORD
CONAN_PASSWORD=$(aws ssm get-parameter --name /compiler-explorer/conanpwd | jq -r .Parameter.Value)
ce builder exec -- sudo docker run --rm --name "${BUILD_NAME}.build" \
-v/home/ubuntu/.s3cfg:/root/.s3cfg:ro \
-v/opt:/opt:ro \
-e 'LOGSPOUT=ignore' \
-e "CONAN_PASSWORD=${CONAN_PASSWORD}" \
"compilerexplorer/library-builder" \
bash "${COMMAND}" "c++" "all" "all"
}
build_rust_libraries() {
local BUILD_NAME=libraryrust
local COMMAND=build.sh
local CONAN_PASSWORD
CONAN_PASSWORD=$(aws ssm get-parameter --name /compiler-explorer/conanpwd | jq -r .Parameter.Value)
ce builder exec -- sudo docker run --rm --name "${BUILD_NAME}.build" \
-v/home/ubuntu/.s3cfg:/root/.s3cfg:ro \
-v/opt:/opt:ro \
-e 'LOGSPOUT=ignore' \
-e "CONAN_PASSWORD=${CONAN_PASSWORD}" \
"compilerexplorer/library-builder" \
bash "${COMMAND}" "rust" "all" "all"
}
build_cpp_libraries
build_rust_libraries
exit ${BUILD_FAILED}