Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #11

Merged
merged 5 commits into from
Mar 1, 2024
Merged

sync #11

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
86 changes: 86 additions & 0 deletions .github/workflows/compile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Compile Firmware

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- "**"
pull_request:
paths:
- "**"
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:

env:
BINARY_FILENAME: firmware.ino.bin
BINARY_ARTIFACT_NAME: firmware

jobs:
build:
name: Build firmware
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
board:
- fqbn: STMicroelectronics:stm32:GenF4:pnum=GENERIC_F411RCTX,usb=CDCgen
platforms: |
# Install STM32duino via Boards Manager for the toolchain
- name: STMicroelectronics:stm32
source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

steps:
- name: Set environment variables
run: |
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
echo "BINARY_OUTPUT_PATH=${{ runner.temp }}/output" >> "$GITHUB_ENV"
echo "SKETCHES_REPORTS_PATH=${{ runner.temp }}/sketches-reports" >> "$GITHUB_ENV"

- name: Checkout repository
uses: actions/checkout@v2

- name: Compile firmware
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
platforms: ${{ matrix.board.platforms }}
libraries: |
- source-path: ./
- source-url: https://github.com/arduino-libraries/Arduino_MAX17332.git
- source-url: https://github.com/gbr1/ucPack.git
- name: STM32duino MotionFX
- name: STM32duino VL53L7CX
- name: AT42QT
- name: Arduino_APDS9960
- name: STM32duino LSM6DSO
- name: Servo
sketch-paths: |
- examples/firmware
cli-compile-flags: |
- --output-dir=${{ env.BINARY_OUTPUT_PATH }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Git describe
id: ghd
uses: proudust/gh-describe@v2

- name: Save firmware binary as workflow artifact
uses: actions/upload-artifact@v2
with:
if-no-files-found: error
path: ${{ env.BINARY_OUTPUT_PATH }}/${{ env.BINARY_FILENAME }}
name: ${{ env.BINARY_ARTIFACT_NAME }}_${{ steps.ghd.outputs.describe }}.bin

- name: Save sketches report as workflow artifact
uses: actions/upload-artifact@v2
with:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: sketches-reports
Loading