Skip to content

Pin settings in platformio.ini #18

Pin settings in platformio.ini

Pin settings in platformio.ini #18

Workflow file for this run

name: BTClock CI
on:
push:
tags:
- '*'
jobs:
prepare:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Install and build"
uses: ./.github/actions/install-build
- name: Copy bootloader to output folder
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .pio
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: prepared-outputs
path: .pio/**/*.bin
build:
needs: prepare
continue-on-error: true
strategy:
matrix:
chip:
- name: lolin_s2_mini
version: esp32s2
- name: lolin_s3_mini
version: esp32s3
- name: orangeclock
version: esp32s3
epd_variant: [213epd, 29epd]
exclude:
- chip: orangeclock
epd_variant: 213epd
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
steps:
- uses: actions/download-artifact@v4
with:
name: prepared-outputs
path: .pio
- name: Install esptools.py
run: pip install --upgrade esptool
- name: Create merged firmware binary
run: mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && esptool.py --chip ${{ matrix.chip.version }} merge_bin -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin --flash_mode dio 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin 0xe000 .pio/boot_app0.bin 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin 0x369000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin
- name: Create checksum for merged binary
run: shasum -a 256 ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin | awk '{print $1}' > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.sha256
# - name: Write commit hash to file
# run: echo $GITHUB_SHA > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/commit.txt
# - name: Write build date to file
# run: echo "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/date.txt
# - name: Copy all artifacts to output folder
# run: cp .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.bin ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin ${{ matrix.chip.name }}_${{ matrix.epd_variant }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.chip.name }}-${{ matrix.epd_variant }}
path: |
${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.bin
${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.sha256
release:
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
needs: build
steps:
- name: Download matrix outputs
uses: actions/download-artifact@v4
with:
pattern: build-*
merge-multiple: true
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "**/*.bin,**/*.sha256"
allowUpdates: true
removeArtifacts: true
makeLatest: true