Skip to content

Commit

Permalink
fix: Fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles Burton committed Jan 9, 2025
1 parent 222ba3f commit 8d3e44b
Show file tree
Hide file tree
Showing 13 changed files with 931 additions and 1,402 deletions.
14 changes: 4 additions & 10 deletions .arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
- uno
- due
# - zero # SAMD covered by M4
# - leonardo # AVR covered by UNO
- m4
# - esp32 # errors on OneWire => util/crc16.h vs rom/crc.h
- esp8266
# - mega2560 # AVR covered by UNO
unittest:
# These dependent libraries will be installed
libraries:
- "OneWire"
skip_unittest: true

aux_libraries_for_ci:
- "OneWire"
8 changes: 7 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ RUN chmod +x /usr/local/bin/update-libraries.sh
# Add aliases for build operations
RUN echo 'alias arduino-build="./build.sh build"' >> /home/vscode/.bashrc && \
echo 'alias arduino-test="./build.sh test"' >> /home/vscode/.bashrc && \
echo 'alias arduino-build-test="./build.sh all"' >> /home/vscode/.bashrc
echo 'alias arduino-build-test="./build.sh all"' >> /home/vscode/.bashrc

# Add welcome message to .bashrc
RUN echo '\n# Welcome to the dev container! Here are some useful aliases:' >> /home/vscode/.bashrc && \
echo 'echo " - arduino-build: Build the project"' >> /home/vscode/.bashrc && \
echo 'echo " - arduino-test: Run tests for the project"' >> /home/vscode/.bashrc && \
echo 'echo " - arduino-build-test: Build and test the project"' >> /home/vscode/.bashrc
36 changes: 15 additions & 21 deletions .devcontainer/arduino-cli.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
board_manager:
additional_urls:
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
daemon:
port: "50051"
directories:
data: /root/.arduino15
downloads: /root/.arduino15/staging
user: /root/Arduino
library:
enable_unsafe_install: true
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
sketch:
always_export_binaries: false
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
- uno
- due
# - zero # SAMD covered by M4
# - leonardo # AVR covered by UNO
- m4
# - esp32 # errors on OneWire => util/crc16.h vs rom/crc.h
# - esp8266
# - mega2560 # AVR covered by UNO
unittest:
# These dependent libraries will be installed
libraries:
- "OneWire"
38 changes: 30 additions & 8 deletions .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
---
name: Arduino CI

on: [push, pull_request]

jobs:
runTest:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1

- 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
run: |
arduino-cli config init
arduino-cli config set library.enable_unsafe_install true
arduino-cli core update-index
arduino-cli core install arduino:avr
- name: Install OneWire library
run: |
arduino-cli lib install OneWire
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
gem install arduino_ci
arduino_ci.rb
ruby-version: '2.6'

- name: Install Arduino CI
run: |
gem install arduino_ci -v 1.5.0
Loading

0 comments on commit 8d3e44b

Please sign in to comment.