-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate samples with independent runs
- Loading branch information
Showing
6 changed files
with
46 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# shellcheck disable=SC2034 | ||
declare -r GREEN='\033[0;32m' | ||
declare -r BOLD='\033[1m' | ||
declare -r RESET='\033[0m' | ||
|
||
declare -r sampleDir="$1" | ||
declare -r CI_VALIDATE_SCRIPT='ci-validate.sh' | ||
|
||
echo "" | ||
echo "" | ||
echo "========================================================================" | ||
printf "Validate sample '${BOLD}%s${RESET}' using: " "$sampleDir" | ||
cd "$sampleDir" || exit | ||
if [[ $(find . -name ${CI_VALIDATE_SCRIPT} -maxdepth 1) ]]; then | ||
echo -e "Custom ${BOLD}${CI_VALIDATE_SCRIPT}${RESET} script..." | ||
./${CI_VALIDATE_SCRIPT} || exit | ||
elif [[ $(find . -name 'build.gradle*' -maxdepth 1) ]]; then | ||
echo -e "${BOLD}Gradle${RESET} build..." | ||
./gradlew build || ./gradlew build --info # re-run to get better failure output | ||
else | ||
echo -e "${BOLD}SwiftPM${RESET} build..." | ||
swift build || exit | ||
fi | ||
|
||
echo -e "Validated sample '${BOLD}${sampleDir}${RESET}': ${BOLD}passed${RESET}." | ||
cd - || exit | ||
|
||
echo | ||
printf "Done validating sample: ${sampleDir}" | ||
echo -e "${GREEN}done${RESET}." |
This file was deleted.
Oops, something went wrong.
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