-
-
Notifications
You must be signed in to change notification settings - Fork 623
Expand file tree
/
Copy pathsmokeci.sh
More file actions
109 lines (103 loc) · 2.4 KB
/
smokeci.sh
File metadata and controls
109 lines (103 loc) · 2.4 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
#Run the very same test suite as run on gitlab CI, but locally
BUILD_DOCKER=manticoresearch/external_toolchain:vcpkg331_20260310
TEST_DOCKER=manticoresearch/ubertests_public:331
boost=boost_nov22
sysroot=roots_nov22
CONFIG=Debug
CACHEB=../cache
SYSROOT="-e SYSROOT_URL=https://repo.manticoresearch.com/repository/sysroots"
if test -d /work/cross/sysroots/checked; then
SYSROOT="-e SYSROOT_URL=file:///sysroots/ -v /work/cross/sysroots/checked:/sysroots"
elif test -d /mnt/repo_storage/sysroots; then
SYSROOT="-e SYSROOT_URL=file:///sysroots/ -v /mnt/repo_storage/sysroots:/sysroots"
fi
build()
{
CONFIG=$1
BUILD_DIR=build_$CONFIG
docker run --rm \
-v $(pwd):/build/dev \
-e uid=`id -u` \
-e gid=`id -g` \
$SYSROOT \
-e DISTR=jammy \
-e arch=x86_64 \
-e boost=$boost \
-e sysroot=$sysroot \
-e DIAGNOSTIC=1 \
-e VERBOSE=1 \
-e CACHEB=$CACHEB \
-e BUILD_DIR=$BUILD_DIR \
-e CTEST_CMAKE_GENERATOR=Ninja \
-e CTEST_CONFIGURATION_TYPE=$CONFIG \
-e UNITY_BUILD=1 \
-e NO_TESTS=1 \
$BUILD_DOCKER /bin/bash -c '
trap "chown -R $uid:$gid /build/dev/$BUILD_DIR" EXIT
cd /build/dev
rm -rf $BUILD_DIR
ctest -VV -S misc/ctest/gltest.cmake
cd $BUILD_DIR
chmod -R a+rw $CACHEB
tar -cf build.tar api/libsphinxclient/testcli src/indexer src/indextool src/searchd src/gtests/gmanticoretest
find . -name *.h -o -name *.c -o -name *.cxx -o -name *.gcno | tar -rf build.tar -T-
mv build.tar /tmp
rm -rf *
rm .ninja_deps
rm .ninja_log
tar -xf /tmp/build.tar
rm /tmp/build.tar
'
}
test ()
{
CONFIG=$1
BUILD_DIR=build_$CONFIG
docker run --rm \
-v $(pwd):/build/dev \
-e uid=`id -u` \
-e gid=`id -g` \
$SYSROOT \
-e DISTR=jammy \
-e arch=x86_64 \
-e boost=$boost \
-e sysroot=$sysroot \
-e DIAGNOSTIC=1 \
-e VERBOSE=1 \
-e CACHEB=$CACHEB \
-e BUILD_DIR=$BUILD_DIR \
-e CTEST_CMAKE_GENERATOR=Ninja \
-e CTEST_CONFIGURATION_TYPE=$CONFIG \
-e UNITY_BUILD=1 \
-e NO_BUILD=1 \
$TEST_DOCKER /bin/bash -c '
cd /build/dev
trap "chown -R $uid:$gid /build/dev/$BUILD_DIR" EXIT
ctest -V -S misc/ctest/gltest.cmake --no-compress-output
'
}
shell ()
{
CONFIG=$1
BUILD_DIR=build_$CONFIG
docker run -it --rm \
-v $(pwd):/build/dev \
$SYSROOT \
-e DISTR=jammy \
-e arch=x86_64 \
-e boost=$boost \
-e sysroot=$sysroot \
-e DIAGNOSTIC=1 \
-e VERBOSE=1 \
-e CACHEB=$CACHEB \
-e BUILD_DIR=$BUILD_DIR \
-e CTEST_CMAKE_GENERATOR=Ninja \
-e CTEST_CONFIGURATION_TYPE=$CONFIG \
-e UNITY_BUILD=1 \
-e NO_BUILD=1 \
$TEST_DOCKER /bin/bash
}
build $CONFIG
time test $CONFIG
#shell $CONFIG