-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathjenkins_driver.sh
executable file
·72 lines (62 loc) · 2.17 KB
/
jenkins_driver.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
# The Jenkins driver script is a bash script run by developers on their _local_ machine that _simulates_ the scripts
# dispatched by Jenkins during a real bot-build. It fills in the various build environment variables and then deploys
# the scripts in order.
#
# The idea is to keep this script in sync with the Jenkins environment, such that a build on Jenkins will work if this
# script works on 3 platforms.
COMMITISH=`git rev-parse HEAD`
BUILD_TYPE=Release
BUILD_TARGETS=$1
WANT_CODESIGN=YES
WANT_UNIT_TESTS=YES
while :
do
case "$1" in
"-n" | "--no_codesign")
WANT_CODESIGN=NO
shift
;;
"--no_unit_tests")
WANT_UNIT_TESTS=NO
shift
;;
*)
break
;;
esac
done
#"C:\vs_2022\"
MSVC_ROOT="/mnt/c/Program Files/Microsoft Visual Studio/2022/Community"
if [[ `uname -a` == *Darwin* ]]; then
PLATFORM=APL
elif [[ `uname -a` == *icrosoft* ]]; then
PLATFORM=IBM
else
PLATFORM=LIN
fi
export COMMITISH
export BUILD_TYPE
export BUILD_TARGETS
export WANT_CODESIGN
export WANT_UNIT_TESTS
export PLATFORM
export MSVC_ROOT
echo ================================================================================================================
echo = CHECKOUT
echo ================================================================================================================
./jenkins/checkout.sh
echo ================================================================================================================
echo = BUILD
echo ================================================================================================================
./jenkins/build.sh
if [[ $WANT_UNIT_TESTS == "YES" ]]; then
echo ================================================================================================================
echo = UNIT TESTS
echo ================================================================================================================
./jenkins/unit_tests.sh
fi
echo ================================================================================================================
echo = ARCHIVE
echo ================================================================================================================
./jenkins/archive.sh