Skip to content

Add Makefile

Add Makefile #37

Workflow file for this run

name: Build Firmware
on:
pull_request:
branches:
- main
paths:
- 'ats-mini/**'
- '.github/workflows/build.yml'
push:
# tags:
# - 'v*'
# branches:
# - main
paths:
- 'ats-mini/**'
- '.github/workflows/build.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions: {}
strategy:
fail-fast: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Compile firmware
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
sketch-paths: |
- ats-mini
fqbn: esp32:esp32:esp32s3
cli-compile-flags: |
- --profile
- esp32s3
- --export-binaries
- --board-options
- CDCOnBoot=cdc
- --board-options
- FlashSize=8M
- --board-options
- PSRAM=disabled
- --board-options
- CPUFreq=80
- --board-options
- USBMode=hwcdc
- --board-options
- FlashMode=qio
- --board-options
- PartitionScheme=default_8MB
- --board-options
- DebugLevel=none
- --warnings
- none
enable-deltas-report: true
enable-warnings-report: true
- name: Save sketches report as workflow artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: sketches-reports
name: sketches-report
- name: Prepare compiled artifact
run: |
mkdir -p artifact/ats-mini && mv ats-mini/build/esp32.esp32.esp32s3/*.ino.bin ats-mini/build/esp32.esp32.esp32s3/*.ino.*.bin artifact/ats-mini/
- name: Get commit hash
id: slug
run: |
echo "SHA7=$(echo "${GITHUB_SHA}" | cut -c1-7)" >> $GITHUB_OUTPUT
echo "VERSION=$(git describe --abbrev=0 --tags || echo v0.00)" >> $GITHUB_OUTPUT
- name: Upload compiled artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ steps.slug.outputs.VERSION }}+${{ steps.slug.outputs.SHA7 }}
path: artifact