-
-
Notifications
You must be signed in to change notification settings - Fork 224
87 lines (73 loc) · 2.5 KB
/
compile_development.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Ahoy Dev-Build for ESP8266/ESP32
on:
push:
branches: development*
paths-ignore:
- '**.md' # Do no build on *.md changes
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: development03
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Cache Pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.x"
- name: Install PlatformIO
run: |
python -m pip install setuptools --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment esp32-s2-mini --environment opendtufusion
- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusion/ota.bin
- name: Rename Binary files
id: rename-binary-files
working-directory: src
run: python ../scripts/getVersion.py >> $GITHUB_OUTPUT
- name: Set Version
uses: cschleiden/replace-tokens@v1
with:
files: tools/esp8266/User_Manual.md
env:
VERSION: ${{ steps.rename-binary-files.outputs.name }}
- name: Create Manifest
working-directory: src
run: python ../scripts/buildManifest.py
- name: Create Artifact
uses: actions/upload-artifact@v3
with:
name: ahoydtu_dev
path: |
src/firmware/*
src/User_Manual.md
src/install.html
- name: Rename firmware directory
run: mv src/firmware src/${{ steps.rename-binary-files.outputs.name }}
- name: Deploy
uses: nogsantos/scp-deploy@master
with:
src: src/${{ steps.rename-binary-files.outputs.name }}/
host: ${{ secrets.FW_SSH_HOST }}
remote: ${{ secrets.FW_SSH_DIR }}/dev
port: ${{ secrets.FW_SSH_PORT }}
user: ${{ secrets.FW_SSH_USER }}
key: ${{ secrets.FW_SSH_KEY }}