-
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (47 loc) · 1.72 KB
/
esphome_compilation.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
name: ESPHome Compilation
on:
push:
pull_request:
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install ESPHome
run: |
python -m pip install --upgrade pip
pip install esphome
- name: Create secrets file
run: |
echo "wifi_ssid: \"myWifiSsid\"" > secrets.yaml
echo "wifi_password: \"myWifiPassword\"" >> secrets.yaml
echo "solar_router_ota_password: \"mySolarRouterOtaPassword\"" >> secrets.yaml
echo "api_encryption_key: \"8q4u9dNBGMcsPemx+Q+WzLTU+mLXHAgPsrTpGjyV1hs=\"" >> secrets.yaml
echo "hotspot_password: \"myHotspotPassword\"" >> secrets.yaml
- name: Compile esp32-proxy-client.yaml
continue-on-error: true
run: esphome compile esp32-proxy-client.yaml
id: conf1
- name: Compile esp32-standalone.yaml
continue-on-error: true
run: esphome compile esp32-standalone.yaml
id: conf2
- name: Compile esp8266-proof-of-concept.yaml
continue-on-error: true
run: esphome compile esp8266-proof-of-concept.yaml
id: conf3
- name: Compile esp8285-power-meter-proxy.yaml
continue-on-error: true
run: esphome compile esp8285-power-meter-proxy.yaml
id: conf4
- name: Check for compile errors
run: |
if [ ${{ steps.conf1.outcome }} == 'failure' ] || [ ${{ steps.conf2.outcome }} == 'failure' || ${{ steps.conf3.outcome }} == 'failure' ] || [ ${{ steps.conf4.outcome }} == 'failure']; then
echo "One or more compilations failed"
exit 1
fi