Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,22 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true

- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@81d310742121c928ea9c8bbd407b4217b432ae02 # v2.0.0

- name: Initialize Arduino CLI
run: |
arduino-cli config init
arduino-cli config set library.enable_unsafe_install true
arduino-cli core update-index

- name: Install required board core
run: arduino-cli core install arduino:avr@1.8.7

- name: Install libraries
run: |
arduino-cli lib install "AM2302-Sensor@1.4.0"
arduino-cli lib install --git-url https://github.com/Zefek/MQTTESP8266.git#6.0


- name: Set configs
run: |
cp config_default.h config.h
cp secret_default.h secret.h

- name: Compile Arduino project
run: |
arduino-cli compile --fqbn arduino:avr:uno ./
arduino-cli compile --profile Garage_UNO ./
17 changes: 4 additions & 13 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,12 @@ jobs:

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true

- name: Initialize Arduino CLI
run: |
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" core update-index
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" config set library.enable_unsafe_install true

- name: Install required board core
run: |
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" core install arduino:avr@1.8.7

- name: Install custom Arduino libraries (Windows)
shell: powershell
run: |
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install --git-url https://github.com/Zefek/MQTTESP8266.git#6.0
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "AM2302-Sensor@1.4.0"

- name: Generate configs from secrets repo
shell: powershell
Expand Down Expand Up @@ -78,7 +69,7 @@ jobs:

- name: Compile Arduino project
run: |
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" compile --fqbn arduino:avr:uno ./ --output-dir build
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" compile --profile Garage_UNO ./ --output-dir build

- name: Upload firmware to Arduino
env:
Expand All @@ -88,4 +79,4 @@ jobs:
Write-Error "Invalid serial port format: $env:SERIAL_PORT"
exit 1
}
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" upload --fqbn arduino:avr:uno --port $env:SERIAL_PORT --input-dir build
& "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" upload --profile Garage_UNO --port $env:SERIAL_PORT --input-dir build
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "MQTTESP8266"]
path = MQTTESP8266
url = https://github.com/Zefek/MQTTESP8266.git
branch = 6.0
1 change: 1 addition & 0 deletions MQTTESP8266
Submodule MQTTESP8266 added at 0fc63a
9 changes: 9 additions & 0 deletions sketch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
profiles:
Garage_UNO:
fqbn: arduino:avr:uno
platforms:
- platform: arduino:avr (1.8.7)
libraries:
- AM2302-Sensor (1.4.0)
- dir: MQTTESP8266
default_profile: Garage_UNO
Loading