forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify sketches as part of travis build
Squashed commits: [7d1b42f] Encrypt token, skip some tests [17b8f39] Fix sha1 example path [f3050b1] Fix build, add webhook [fd2c9bd] Fix build errors, update mDNS library readme [7b87031] Make common.sh more flexible [3ba3eb2] Test all sketches [87beb8a] Build all sketches in esp8266 core [f2464f1] Fix paths [823a9ae] Remove sudo usage [7fce734] Fix arduino commands [619bc7d] Move all commands into travis script [15a5ada] First attempt test runner
- Loading branch information
Showing
10 changed files
with
115 additions
and
91 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 |
---|---|---|
@@ -1,35 +1,38 @@ | ||
sudo: true | ||
sudo: false | ||
|
||
language: java | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- ant | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
script: | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -qq ant; fi | ||
- pushd build | ||
- echo "" | ant dist | ||
- echo "" | ant build | ||
- popd | ||
#- bash -x ./generate-appimage | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: eKHcAMuC58JZKRsn1QwbiYE4aL/9dZsybDqqHTo1dUo8x9+3fGed/Dci76ItFFS7SmFfIdl6ej8/Uj0nPK/sIE21blKBe3+L0KAJm0TTq3m0ig1suCmMipCsSW+srWYM0hl58+OKagM4FoHKDjsEnzRDv9Z4xtxyvG+7/XLD1dE= | ||
skip_cleanup: true | ||
file_glob: true | ||
file: | ||
- '$TRAVIS_BUILD_DIR/build/linux/arduino-*.tar.xz' | ||
# - '$TRAVIS_BUILD_DIR/Arduino.AppImage' | ||
on: | ||
tags: true | ||
all_branches: true | ||
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16 | ||
- sleep 3 | ||
- export DISPLAY=:1.0 | ||
- export PATH="$PWD/build/linux/work:$PATH" | ||
- which arduino | ||
- source hardware/esp8266com/esp8266/tests/common.sh | ||
- arduino --board esp8266com:esp8266:generic --save-prefs | ||
- build_sketches arduino $PWD/hardware/esp8266com/esp8266 | ||
|
||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: change | ||
webhooks: | ||
urls: | ||
- secure: "dnSY+KA7NK+KD+Z71copmANDUsyVePrZ0iXvXxmqMEQv+lp3j2Z87G5pHn7j0WNcNZrejJqOdbElJ9Q4QESRaAYxTR7cA6ameJeEKHiFJrQtN/4abvoXb9E1CxpL8aNON/xgnqCk+fycOK3nbWWXlJBodzBm7KN64vrcHO7et+M=" | ||
on_success: change # options: [always|never|change] default: always | ||
on_failure: always # options: [always|never|change] default: always | ||
on_start: false # default: false |
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
64 changes: 32 additions & 32 deletions
64
libraries/Hash/examples/sha1.ino → libraries/Hash/examples/sha1/sha1.ino
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
/** | ||
* simple demo to show sha1 calculation | ||
*/ | ||
#include <Arduino.h> | ||
#include <Hash.h> | ||
|
||
void setup() { | ||
Serial.begin(921600); | ||
} | ||
|
||
void loop() { | ||
|
||
// usage as String | ||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 | ||
|
||
Serial.print("SHA1:"); | ||
Serial.println(sha1("abc")); | ||
|
||
// usage as ptr | ||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 | ||
uint8_t hash[20]; | ||
sha1("abc", &hash[0]); | ||
|
||
Serial.print("SHA1:"); | ||
for(uint16_t i = 0; i < 20; i++) { | ||
Serial.printf("%02x", hash[i]); | ||
} | ||
Serial.println(); | ||
|
||
delay(1000); | ||
} | ||
|
||
/** | ||
* simple demo to show sha1 calculation | ||
*/ | ||
#include <Arduino.h> | ||
#include <Hash.h> | ||
|
||
void setup() { | ||
Serial.begin(921600); | ||
} | ||
|
||
void loop() { | ||
|
||
// usage as String | ||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 | ||
|
||
Serial.print("SHA1:"); | ||
Serial.println(sha1("abc")); | ||
|
||
// usage as ptr | ||
// SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 | ||
uint8_t hash[20]; | ||
sha1("abc", &hash[0]); | ||
|
||
Serial.print("SHA1:"); | ||
for(uint16_t i = 0; i < 20; i++) { | ||
Serial.printf("%02x", hash[i]); | ||
} | ||
Serial.println(); | ||
|
||
delay(1000); | ||
} | ||
|
Empty file.
Empty file.
Empty file.
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,22 @@ | ||
#!/bin/bash | ||
|
||
function build_sketches() | ||
{ | ||
local arduino=$1 | ||
local srcpath=$2 | ||
local sketches=$(find $srcpath -name *.ino) | ||
for sketch in $sketches; do | ||
local sketchdir=$(dirname $sketch) | ||
if [[ -f "$sketchdir/.test.skip" ]]; then | ||
echo -e "\n\n ------------ Skipping $sketch ------------ \n\n"; | ||
continue | ||
fi | ||
echo -e "\n\n ------------ Building $sketch ------------ \n\n"; | ||
$arduino --verify --verbose $sketch; | ||
local result=$? | ||
if [ $result -ne 0 ]; then | ||
echo "Build failed ($1)" | ||
return $result | ||
fi | ||
done | ||
} |