Skip to content

Commit a2203d5

Browse files
committed
2 parents 8813fcb + 73cb9fc commit a2203d5

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Multi-Printer Firmware
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
environment: [drucker_1, drucker_2, drucker_3] # Hier werden 3 parallele Jobs gestartet
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Cache pip
16+
uses: actions/cache@v3
17+
with:
18+
path: ~/.cache/pip
19+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
20+
21+
- name: Cache PlatformIO
22+
uses: actions/cache@v3
23+
with:
24+
path: ~/.platformio
25+
key: ${{ runner.os }}-platformio
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.11'
31+
32+
- name: Install PlatformIO
33+
run: pip install -U platformio
34+
35+
- name: Run PlatformIO Build
36+
run: pio run -e ${{ matrix.environment }}
37+
env:
38+
WIFI_SSID: ${{ secrets.WIFI_SSID }}
39+
WIFI_PASS: ${{ secrets.WIFI_PASS }}
40+
API_KEY_D1: ${{ secrets.API_KEY_D1 }}
41+
API_KEY_D2: ${{ secrets.API_KEY_D2 }}
42+
API_KEY_D3: ${{ secrets.API_KEY_D3 }}
43+
44+
- name: Upload Binary
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: firmware-${{ matrix.environment }}
48+
path: .pio/build/${{ matrix.environment }}/firmware.bin

0 commit comments

Comments
 (0)