-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdev-stack-build.sh
More file actions
executable file
·108 lines (85 loc) · 2.65 KB
/
dev-stack-build.sh
File metadata and controls
executable file
·108 lines (85 loc) · 2.65 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
#!/usr/bin/env bash
set -e
# Parse command line arguments
CACHE="false"
while getopts "c" opt; do
case ${opt} in
c )
CACHE="true"
;;
\? )
echo "Usage: cmd [-c]"
exit 1
;;
esac
done
# Set the environment
source /opt/ros/foxy/setup.bash
source /opt/intel/openvino_2021/bin/setupvars.sh
# Change to build directory
cd ws
if [ "$CACHE" != "true" ]; then
# Undo checkouts / patches
for pkg_dir in */;
do
cd $pkg_dir
if [ -d .git ]; then
git reset --hard
fi
cd ..
done
rosws update
#######
#
# START - Pull request specific changes
#
# Update packages for PR's
# https://github.com/aws-deepracer/aws-deepracer-inference-pkg/pull/4
cd aws-deepracer-inference-pkg
git fetch origin pull/5/head:tflite
git checkout tflite
cd ..
# https://github.com/aws-deepracer/aws-deepracer-camera-pkg/pull/5
cd aws-deepracer-camera-pkg
git fetch origin pull/5/head:compressed-image
git checkout compressed-image
cd ..
# https://github.com/aws-deepracer/aws-deepracer-interfaces-pkg/pull/4
cd aws-deepracer-interfaces-pkg
git fetch origin pull/4/head:compressed-image
git checkout compressed-image
cd ..
# https://github.com/aws-deepracer/aws-deepracer-sensor-fusion-pkg/pull/4
cd aws-deepracer-sensor-fusion-pkg
git fetch origin pull/4/head:compressed-image
git checkout compressed-image
cd ..
# https://github.com/aws-deepracer/aws-deepracer-model-optimizer-pkg/pull/2
cd aws-deepracer-model-optimizer-pkg
git fetch origin pull/3/head:tflite
git checkout tflite
cd ..
# Patch with aws-deepracer-ctrl-pkg.patch
cd aws-deepracer-ctrl-pkg
git apply ../../files/aws-deepracer-ctrl-pkg.patch
cd ..
# Remove previous builds (gives clean build)
rm -rf install build log
# Resolve the dependencies
rosdep install -i --from-path . --ignore-src --rosdistro foxy -y
#
# END - Pull request specific changes
#
#######
# Update deepracer_launcher.py (fix an issue in the file)
cp ../files/launch/deepracer_launcher.py ./aws-deepracer-launcher/deepracer_launcher/launch/deepracer_launcher.py
# Turn off SW update
sed -i "s/ENABLE_PERIODIC_SOFTWARE_UPDATE = True/ENABLE_PERIODIC_SOFTWARE_UPDATE = False/" aws-deepracer-systems-pkg/deepracer_systems_pkg/deepracer_systems_pkg/software_update_module/software_update_config.py
fi
# Build the core
colcon build --packages-up-to deepracer_launcher rplidar_ros
# Build the add-ons
colcon build --packages-up-to logging_pkg
cd ..
set +e
echo "Done!"