-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- chore(actions): added github actions for build on PR
- Loading branch information
Mario Lukas
committed
Sep 16, 2023
1 parent
aecaeb0
commit 6268f7d
Showing
5 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"action": "opened", | ||
"number": 1, | ||
"pull_request": { | ||
"base": { | ||
"ref": "main" | ||
}, | ||
"head": { | ||
"ref": "feature-branch" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"push": { | ||
"ref": "refs/tags/v.0.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"push": { | ||
"ref": "refs/master" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build Bluetti ESP32 Bridge with Arduino IDE | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
workflow_run: | ||
workflows: ["Build with Arduino on PR Request"] | ||
types: | ||
- completed | ||
branches: | ||
- main # Change this to the branch you want to trigger the build on | ||
- | ||
jobs: | ||
build-firmware: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: 🏗 Install build dependencies | ||
run: sudo apt-get -qq update && sudo apt-get -y install build-essential curl python3-serial | ||
|
||
- name: ⬇ Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
||
- name: Install Arduino CLI | ||
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh | ||
|
||
- name: Install platform | ||
run: | | ||
arduino-cli core update-index | ||
arduino-cli core install esp32:esp32 | ||
- name: Install Platform | ||
run: | | ||
arduino-cli lib install WiFiManager | ||
arduino-cli lib install PubSubClient | ||
export ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true && arduino-cli lib install --git-url https://github.com/me-no-dev/AsyncTCP.git | ||
export ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true && arduino-cli lib install --git-url https://github.com/me-no-dev/ESPAsyncWebServer.git | ||
export ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true && arduino-cli lib install --git-url https://github.com/h2zero/NimBLE-Arduino.git | ||
arduino-cli lib install AsyncElegantOTA | ||
arduino-cli lib install "Adafruit SSD1306" | ||
arduino-cli lib install "Adafruit GFX Library" | ||
arduino-cli lib install "Adafruit BusIO" | ||
- name: 🔨 Build Firmware | ||
run: | | ||
cd Bluetti_ESP32 | ||
arduino-cli compile --fqbn esp32:esp32:esp32 Bluetti_ESP32.ino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build Bluetti ESP32 Bridge with PlatformIO | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
workflow_run: | ||
workflows: ["Build with PlatformIO on PR Request"] | ||
types: | ||
- completed | ||
branches: | ||
- main # Change this to the branch you want to trigger the build on | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' # Set the desired Python version | ||
|
||
- name: Install PlatformIO | ||
run: | | ||
pip install -U platformio | ||
platformio platform install espressif32 | ||
- name: Build ESP32 Program | ||
run: | | ||
platformio run | ||
# - name: Upload artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: firmware # Set the name of the artifact directory | ||
# path: .pio/build/<environment_name> # Replace <environment_name> with your PlatformIO environment name |