-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update library version to 1.3.0 and add compile_errors.log to …
….gitignore
- Loading branch information
1 parent
1ee33c0
commit 495e456
Showing
8 changed files
with
167 additions
and
5 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,39 @@ | ||
name: Build Arduino Examples | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install Arduino CLI | ||
uses: arduino/setup-arduino-cli@v2 | ||
|
||
- name: Install Arduino Cores | ||
run: | | ||
arduino-cli config init | ||
arduino-cli core update-index | ||
arduino-cli core install arduino:avr | ||
arduino-cli core install esp32:esp32 | ||
- name: Install libs | ||
run: | | ||
arduino-cli lib install "Ethernet" | ||
arduino-cli lib install "GovoroxSSLClient" | ||
arduino-cli lib install "WiFi" | ||
arduino-cli lib install "ArduinoHttpClient" | ||
arduino-cli lib install "PubSubClient" | ||
arduino-cli lib install "TinyGSM" | ||
- name: Compile Examples | ||
run: | | ||
./.github/workflows/scripts/compile_arduino_examples.sh --clean |
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,97 @@ | ||
#!/usr/bin/bash | ||
|
||
# Set the root directory containing the example directories | ||
ROOT_DIR=$(pwd) | ||
CLEAN=false | ||
|
||
# Boards to test | ||
BOARDS=("arduino:avr:uno" "esp32:esp32:esp32doit-devkit-v1" "esp32:esp32:esp32wroverkit") | ||
|
||
# Parse command line options | ||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
--clean) CLEAN=true ;; | ||
*) echo "Unknown parameter passed: $1"; exit 1 ;; | ||
esac | ||
shift | ||
done | ||
|
||
# Initialize results array | ||
declare -A RESULTS | ||
|
||
# Function to compile the example for a specific board | ||
compile_example() { | ||
local example_dir=$1 | ||
local board=$2 | ||
local example_name | ||
example_name=$(basename "$example_dir") | ||
echo "Compiling example in directory: $example_dir for board: $board" | ||
|
||
# Change to the example directory | ||
cd "$example_dir" || exit 1 | ||
|
||
# Compile the example using arduino-cli | ||
arduino-cli compile --fqbn "$board" . || { | ||
echo "Compilation failed for $example_dir for board: $board" >> "$ROOT_DIR/compile_errors.log" | ||
RESULTS["$example_name,$board"]="Failed" | ||
return 1 | ||
} | ||
|
||
echo "Compilation successful for $example_dir for board: $board" | ||
RESULTS["$example_name,$board"]="Passed" | ||
} | ||
|
||
# Function to clean the example | ||
clean_example() { | ||
local example_dir=$1 | ||
echo "Cleaning example in directory: $example_dir" | ||
|
||
# Change to the example directory | ||
cd "$example_dir" || exit 1 | ||
|
||
# Clean the example using arduino-cli | ||
arduino-cli cache clean || { | ||
echo "Cleaning failed for $example_dir" | ||
return 1 | ||
} | ||
|
||
echo "Cleaning successful for $example_dir" | ||
|
||
# Remove build directory if --clean option is passed | ||
if [ "$CLEAN" = true ]; then | ||
echo "Removing build directory in $example_dir" | ||
rm -rf build | ||
fi | ||
|
||
# Return to the root directory | ||
cd "$ROOT_DIR" || exit 1 | ||
} | ||
|
||
# Remove previous log file | ||
rm -f "$ROOT_DIR/compile_errors.log" | ||
|
||
# Iterate over each example directory | ||
for example_dir in "$ROOT_DIR"/examples/Esp32-Arduino-IDE/*/; do | ||
echo "$example_dir" | ||
# Check if the directory contains a .ino file | ||
if [ -f "$example_dir"/*.ino ]; then | ||
for board in "${BOARDS[@]}"; do | ||
compile_example "$example_dir" "$board" | ||
done | ||
|
||
# Clean the example after all board-specific compilations are complete | ||
clean_example "$example_dir" | ||
else | ||
echo "Skipping directory $example_dir (no .ino file found)" | ||
fi | ||
done | ||
|
||
# Generate summary | ||
echo "Compilation Summary:" | ||
echo "====================" | ||
for key in "${!RESULTS[@]}"; do | ||
IFS=',' read -r example_name board <<< "$key" | ||
echo "Example: $example_name, Board: $board, Result: ${RESULTS[$key]}" | ||
done | ||
|
||
echo "All examples processed. Check compile_errors.log for any compilation errors." |
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
.github/workflows/scripts/install_sslclient_for_testing.sh
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,25 @@ | ||
#!/usr/bin/bash | ||
|
||
# Remove existing SSLClient directory to avoid conflicts | ||
rm -rf ~/SSLClient | ||
|
||
# Clone the repository | ||
git clone https://github.com/govorox/SSLClient.git ~/SSLClient | ||
cd ~/SSLClient | ||
|
||
# Checkout the desired branch | ||
git checkout v1.3.0 # Use the correct branch name if different | ||
|
||
# Ensure correct structure | ||
mkdir -p SSLClient # Create the directory for the library files | ||
mv LICENSE README.md docs examples library.json library.properties platformio.ini src test SSLClient/ | ||
|
||
# Compress the directory | ||
zip -r SSLClient.zip SSLClient | ||
|
||
# Enable unsafe installs in Arduino CLI configuration | ||
mkdir -p ~/.arduino15 | ||
echo -e "library:\n enable_unsafe_install: true" > ~/.arduino15/arduino-cli.yaml | ||
|
||
# Install the library using Arduino CLI | ||
arduino-cli lib install --config-file ~/.arduino15/arduino-cli.yaml --zip-path SSLClient.zip |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.vscode/ | ||
lib/* | ||
test.log | ||
emulation.log | ||
emulation.log | ||
compile_errors.log |
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,6 +1,6 @@ | ||
{ | ||
"name": "SSLClient", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"repository": | ||
{ | ||
"type": "git", | ||
|
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,5 +1,5 @@ | ||
name=GovoroxSSLClient | ||
version=1.2.0 | ||
version=1.3.0 | ||
author=V Govorovski | ||
maintainer=Robert Byrnes <[email protected]> | ||
sentence=Provides secure network connection over a generic Client transport object. | ||
|