Skip to content

used single integer for transmission! #22

used single integer for transmission!

used single integer for transmission! #22

Workflow file for this run

# Written with https://mirzafahad.github.io/2021-03-09-github-cicd-for-arduino-projects/
# This is the name of the workflow, visible on GitHub UI.
name: Build Firmware
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request only for the main branch
push:
paths:
- 'firmware/**'
- '.github/**'
branches: [ main ]
pull_request:
paths:
- 'firmware/**'
- '.github/**'
branches: [ main ]
# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job - can be whatever.
build:
# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
matrix:
# The matrix will produce one job for each configuration
# parameter of type `arduino-platform`, in this case, it
# is only 1.
arduino-platform: ["arduino:avr"]
# This is usually optional but we need to statically define the
# FQBN of the boards we want to test for each platform. In the
# future the CLI might automatically detect and download the
# core needed to compile against a certain FQBN, at that point
# the following `include` section will be useless.
include:
# This works like this: when the platformn is "arduino:avr",
# the variable `fqbn` is set to "arduino:avr:uno".
- arduino-platform: "arduino:avr"
fqbn: "arduino:avr:uno"
name: "arduino-avr-uno"
runs-on: ubuntu-latest
# full list of steps for "Build Firmware" job
steps:
# First clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@main
# use the `arduino/setup-arduino-cli` action to install/configure the Arduino CLI
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.2
# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
- name: Install libraries
run: |
arduino-cli lib install MsgPack@0.4.2
# Compile using the FQBN that was set in the build matrix.
- name: Compile Firmware
run: |
mkdir ./firmware/release/
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./firmware/firmware.ino --warnings more --output-dir ./firmware/release/
- uses: actions/upload-artifact@v4
with:
name: "compiled-firmware-${{ matrix.name }}"
path: ./firmware/release