Skip to content

fix: Fettling

fix: Fettling #12

Workflow file for this run

name: Arduino CI
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
# Debug: Show initial contents
echo "Initial OneWire util directory contents:"
ls -la /home/runner/Arduino/libraries/OneWire/util/
# Only create symlink for crc16.h if it doesn't exist
if [ ! -f "/home/runner/Arduino/libraries/OneWire/util/crc16.h" ]; then
sudo ln -s /usr/lib/avr/include/util/crc16.h /home/runner/Arduino/libraries/OneWire/util/
fi
# Debug: Show final contents
echo "Final OneWire util directory contents:"
ls -la /home/runner/Arduino/libraries/OneWire/util/
- 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: Run tests
run: |
bundle exec arduino_ci.rb