Skip to content

Commit

Permalink
attempt to get CI working and updated
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Sep 26, 2023
1 parent f0a011d commit 6c725b8
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ jobs:
build-application-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Prepare copy of Arduino source to distribute with Windows EXE 0
run: mkdir artifact
- name: Prepare copy of Arduino source to distribute with Windows EXE 1
run: mkdir artifact\miriam-arduino-firmware-source
- name: Prepare copy of Arduino source to distribute with Windows EXE 2
run: mkdir artifact\miriam-arduino-firmware-source\Serial_003
- name: Prepare copy of Arduino source to distribute with Windows EXE 3
run: copy .\Programs\Serial_003\Serial_003.ino .\artifact\miriam-arduino-firmware-source\Serial_003\
- name: Prepare copy of Arduino source to distribute with Windows EXE 3.1
run: copy .\Programs\Serial_003\MyStatusLed.h .\artifact\miriam-arduino-firmware-source\Serial_003\
- name: Prepare copy of Arduino source to distribute with Windows EXE 3.2
run: copy .\Programs\Serial_003\MyStatusLed.cpp .\artifact\miriam-arduino-firmware-source\Serial_003\
- name: Prepare copy of Arduino source to distribute with Windows EXE 4
run: copy .\Programs\README-arduino-firmware.md .\artifact\miriam-arduino-firmware-source\README.md
- name: Prepare copy of Arduino source to distribute with Windows
run: |
mkdir artifact\miriam-arduino-firmware-source
mkdir artifact\miriam-arduino-firmware-source\Serial_003
copy .\Programs\Serial_003\Serial_003.ino .\artifact\miriam-arduino-firmware-source\Serial_003\
copy .\Programs\Serial_003\MyStatusLed.h .\artifact\miriam-arduino-firmware-source\Serial_003\
copy .\Programs\Serial_003\MyStatusLed.cpp .\artifact\miriam-arduino-firmware-source\Serial_003\
copy .\Programs\README-arduino-firmware.md .\artifact\miriam-arduino-firmware-source\README.md
- name: Make Arduino library
uses: papeloto/action-zip@v1
with:
Expand All @@ -39,7 +35,7 @@ jobs:
- name: copy Miriam executable
run: copy D:\a\Miriam\Miriam\Programs\Serial_003\Miriam_Serial\MiriamTests\bin\Release\Miriam_Serial.exe artifact\Miriam_Serial.exe
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: miriam
path: |
Expand All @@ -51,19 +47,17 @@ jobs:
# and https://blog.arduino.cc/2019/11/14/arduino-on-github-actions/
runs-on: windows-2019
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- uses: arduino/setup-arduino-cli@v1.1.1
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install arduino:avr
- name: Compile Sketch
run: arduino-cli compile --fqbn arduino:avr:mega:cpu=atmega2560 --libraries ./Programs/PID_v1 --output-dir miriam-firmware ./Programs/Serial_003/Serial_003
# TODO: also include the source code because it seems easier flash Arduino
# firmware from source. Unfortunately flashing a .hex file seems rather
# painful https://forum.arduino.cc/index.php?topic=417659.0 .
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: miriam-firmware
path: miriam-firmware\Serial_003.ino.hex
run: |
dir
arduino-cli compile --fqbn arduino:avr:mega:cpu=atmega2560 --libraries .\Programs\PID_v1 --output-dir miriam-firmware .\Programs\Serial_003\Serial_003
# Do not upload firmware HEX file because we include the .ino source with
# the Windows application. Is is easier for the user becaue unfortunately
# flashing a .hex file seems rather painful
# https://forum.arduino.cc/index.php?topic=417659.0 .

0 comments on commit 6c725b8

Please sign in to comment.