forked from compiler-explorer/infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remove_old_compilers.sh
executable file
·58 lines (54 loc) · 1.52 KB
/
remove_old_compilers.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
51
52
53
54
55
56
57
58
#!/bin/bash
KEEP_LAST=5
S3=s3://compiler-explorer/opt/
remove_older() {
local compiler=$1
for old_file in $(aws s3 ls ${S3} | grep -oE "\s${compiler}"'-trunk-[0-9]+.*' | sort | head -n -${KEEP_LAST}); do
echo Removing ${S3}${old_file}
aws s3 rm ${S3}${old_file}
done
}
remove_older_master() {
local compiler=$1
for old_file in $(aws s3 ls ${S3} | grep -oE "\s${compiler}"'-master-[0-9]+.*' | sort | head -n -${KEEP_LAST}); do
echo Removing ${S3}${old_file}
aws s3 rm ${S3}${old_file}
done
}
# try to keep this in the same order as admin-daily-builds.sh
remove_older llvm
remove_older gcc
remove_older gcc-lock3-contracts
remove_older gcc-lock3-contract-labels
remove_older gcc-cxx-modules
remove_older gcc-cxx-coroutines
remove_older gcc-embed
remove_older gcc-static-analysis
remove_older_master gcc-gccrs
remove_older clang
remove_older clang-assertions
remove_older clang-cppx
remove_older clang-cppx-ext
remove_older clang-cppx-p2320
remove_older clang-relocatable
remove_older clang-autonsdmi
remove_older clang-lifetime
remove_older clang-llvmflang
remove_older clang-parmexpr
remove_older clang-patmat
remove_older clang-embed
remove_older clang-dang-main
remove_older clang-widberg-main
remove_older llvm-spirv
remove_older go
remove_older tinycc
remove_older cc65
remove_older_master mrustc
remove_older_master cproc
remove_older_master rustc-cg-gcc
remove_older_master SPIRV-Tools
remove_older arm-gcc
remove_older arm64-gcc
remove_older ispc
remove_older mrisc32
remove_older tendra