Skip to content

fix: Resolved docker issues #67

fix: Resolved docker issues

fix: Resolved docker issues #67

Workflow file for this run

name: Arduino-Temperature-Control-Library Github Workflow
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install AVR dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-avr avr-libc
- name: Create required directories
run: |
mkdir -p $GITHUB_WORKSPACE/libraries
mkdir -p $GITHUB_WORKSPACE/.arduino15
mkdir -p $GITHUB_WORKSPACE/Arduino
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Configure Arduino CLI and install cores
run: |
arduino-cli config init
arduino-cli config set library.enable_unsafe_install true
arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core update-index
arduino-cli core install arduino:avr
arduino-cli core install esp8266:esp8266
- name: Install OneWire library
run: |
arduino-cli lib install OneWire
# Replace the CRC implementation directly in the OneWire library
cat > /home/runner/Arduino/libraries/OneWire/util/crc16.h << 'EOF'
#ifndef CRC16_H
#define CRC16_H
#include <stdint.h>
static inline uint16_t _crc16_update(uint16_t crc, uint8_t a)
{
crc ^= a;
for (uint8_t i = 0; i < 8; ++i) {
if (crc & 1)
crc = (crc >> 1) ^ 0xA001;
else
crc = (crc >> 1);
}
return crc;
}
#endif
EOF
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
- name: Install bundler
run: |
gem install bundler
- name: Install dependencies
run: |
bundle install
- name: List repository contents (for debugging)
run: |
ls -R
- name: Remove Blacklisted Example Sketches
run: |
echo "Removing blacklisted example sketches..."
rm -f examples/ESP-WebServer/ESP-WebServer.ino
- name: Run tests
run: |
bundle exec arduino_ci.rb