Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nonik0 committed Feb 21, 2024
1 parent 4b4917c commit 1694fb1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PlatformIO CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio

- name: Build PlatformIO Project
run: pio run

- name: Rename bin file
run: mv .pio/build/m5cardputer/firmware.bin LoRaChat.bin

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: CardputerLoRaChat
path: LoRaChat.bin
if-no-files-found: error
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void saveScreenshot()
file.write(pngBytes, pngLen);
file.flush();
file.close();
USBSerial.println("saved screenshot to " + filename);
USBSerial.println("saved screenshot to " + filename + ", " + String(pngLen) + " bytes");
}
else
{
Expand Down
1 change: 0 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[platformio]
src_dir = .
workspace_dir = G:\.pio\LoRaChat

[env:m5cardputer]
platform = espressif32
Expand Down

0 comments on commit 1694fb1

Please sign in to comment.