-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linux build break from makefile refactor
- Split out building all projects from presubmit into its own script. - Fix warnings generated by demos that have warnings on specific platforms. - Build multiplatform demos for every platform (except for linux due to many complications). Resolves #1038
- Loading branch information
Showing
11 changed files
with
142 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/bin/bash | ||
|
||
BUILD_CAPTURE=0 | ||
|
||
# Get base path | ||
SJBASE=$(dirname "$0") | ||
SJBASE=$(cd "$SJBASE/.." ; pwd -P) | ||
|
||
. $SJBASE/tools/common.sh | ||
|
||
#################################### | ||
# All Projects Build Check # | ||
#################################### | ||
print_divider "Checking that all projects build" | ||
|
||
# Get all multiplatform projects | ||
LIST_OF_PROJECT=$(find $SJBASE/demos/multiplatform -name "makefile") | ||
LIST_OF_PLATFORMS=(lpc40xx lpc17xx stm32f4xx stm32f10x) | ||
|
||
for d in $LIST_OF_PROJECT | ||
do | ||
for p in "${LIST_OF_PLATFORMS[@]}" | ||
do | ||
PROJECT_PATH=$(dirname $d) | ||
cd "$PROJECT_PATH" | ||
printf "$YELLOW" | ||
printf " Building Multiplatform Demo ($p)\n" | ||
printf " $PROJECT_PATH" | ||
printf "$RESET " | ||
# Clean the build and start building from scratch | ||
SILENCE=$(make clean) | ||
# Check if the system can build without any warnings! | ||
SILENCE=$(make application WARNINGS_ARE_ERRORS=-Werror PLATFORM=$p) | ||
# Add the return codes of the previous build capture. None zero means that | ||
# at least one of the captures failed. | ||
SPECIFIC_BUILD_CAPTURE=$? | ||
BUILD_CAPTURE=$(($BUILD_CAPTURE + $SPECIFIC_BUILD_CAPTURE)) | ||
print_status $SPECIFIC_BUILD_CAPTURE | ||
echo "" | ||
done | ||
done | ||
|
||
printf "$YELLOW Building hello_world Project $RESET" | ||
# Change to the hello_world project | ||
cd "$SJBASE/projects/hello_world" | ||
# Purge repository of all application and framework build files and start | ||
# building from scratch | ||
SILENCE=$(make purge) | ||
# Check if the system can build without any warnings! | ||
SILENCE=$(make -s application WARNINGS_ARE_ERRORS=-Werror) | ||
# Set build capture to return code from the build | ||
BUILD_CAPTURE=$? | ||
print_status $BUILD_CAPTURE | ||
echo "" | ||
|
||
printf "$YELLOW Building Starter Project $RESET" | ||
# Change to the Hyperload project | ||
cd "$SJBASE/projects/starter" | ||
# Clean the build and start building from scratch | ||
SILENCE=$(make clean) | ||
# Check if the system can build without any warnings! | ||
SILENCE=$(make -s application WARNINGS_ARE_ERRORS=-Werror) | ||
# Set build capture to return code from the build | ||
SPECIFIC_BUILD_CAPTURE=$? | ||
BUILD_CAPTURE=$(($BUILD_CAPTURE + $SPECIFIC_BUILD_CAPTURE)) | ||
print_status $SPECIFIC_BUILD_CAPTURE | ||
echo "" | ||
|
||
printf "$YELLOW Building Barebones Project $RESET" | ||
# Change to the Hyperload project | ||
cd "$SJBASE/projects/barebones" | ||
# Clean the build and start building from scratch | ||
SILENCE=$(make clean) | ||
# Check if the system can build without any warnings! | ||
SILENCE=$(make -s application WARNINGS_ARE_ERRORS=-Werror) | ||
# Set build capture to return code from the build | ||
SPECIFIC_BUILD_CAPTURE=$? | ||
BUILD_CAPTURE=$(($BUILD_CAPTURE + $SPECIFIC_BUILD_CAPTURE)) | ||
print_status $SPECIFIC_BUILD_CAPTURE | ||
echo "" | ||
|
||
# Build all example projects | ||
cd $SJBASE/demos/ | ||
# Get all demos with makefiles but ignore multiplatform projects | ||
LIST_OF_PROJECT=$(find $SJBASE/demos/ -name "makefile" | \ | ||
grep -v "multiplatform") | ||
|
||
for d in $LIST_OF_PROJECT | ||
do | ||
PROJECT_PATH=$(dirname $d) | ||
cd "$PROJECT_PATH" | ||
printf "$YELLOW Building Demo $PROJECT_PATH $RESET" | ||
# Clean the build and start building from scratch | ||
SILENCE=$(make clean) | ||
# Check if the system can build without any warnings! | ||
SILENCE=$(make application WARNINGS_ARE_ERRORS=-Werror) | ||
# Add the return codes of the previous build capture. None zero means that at | ||
# least one of the captures failed. | ||
SPECIFIC_BUILD_CAPTURE=$? | ||
BUILD_CAPTURE=$(($BUILD_CAPTURE + $SPECIFIC_BUILD_CAPTURE)) | ||
print_status $SPECIFIC_BUILD_CAPTURE | ||
echo "" | ||
done | ||
|
||
exit $BUILD_CAPTURE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters