-
Notifications
You must be signed in to change notification settings - Fork 46
88 lines (73 loc) · 2.85 KB
/
ci.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
name: Rflink Build Tests
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U platformio==6.1.5
pio update
pip install esptool
- name: Make a BUILDNAME
run: echo "RFLINK_BUILDNAME=\"$(date '+%Y%m%d-%H%M%S')-${GITHUB_REF#refs/heads/}\"" >> $GITHUB_ENV
- name: ESP32_none_enabled
run: |
echo "buid name $RFLINK_BUILDNAME"
pio run --project-conf .travis.platformio.ini --environment ESP32_none_enabled
- name: ESP32_sw
run: |
pio run --project-conf .travis.platformio.ini --environment ESP32_sw
- name: sonoff_bridge
run: |
pio run --project-conf .travis.platformio.ini --environment sonoff_bridge
- name: Copy firmwares in 1 place
if: github.event_name == 'push'
run: |
mkdir firmwares
cp .pio/build/ESP32_sw/bootloader.bin firmwares/bootloader_dio_40m.bin
cp .pio/build/ESP32_sw/firmware.bin firmwares/esp32-firmware-OTA.bin
cp .pio/build/ESP32_sw/partitions.bin firmwares/esp32-partitions.bin
cp .pio/build/sonoff_bridge/firmware.bin firmwares/sonoff_bridge-firmware.bin
cd firmwares
cp /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .
python ../tools/esp32-makeimg.py bootloader_dio_40m.bin esp32-partitions.bin boot_app0.bin esp32-firmware-OTA.bin esp32-full.img
cd ..
- name: Publish firmware for Master branch
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "nightly"
prerelease: true
title: "Latest *almost* stable Build"
files: |
firmwares/*
- name: Publish firmware for rtl_433 branch
if: github.ref == 'refs/heads/rtl_433' && github.event_name == 'push'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "nightly-RTL_433"
prerelease: true
title: "RTL_433 Development Build"
files: |
firmwares/*
- name: Publish firmware for testing-only branch
if: github.ref == 'refs/heads/testing-only' && github.event_name == 'push'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "nightly-testing-only"
prerelease: true
title: "TESTING ONLY - ONLY USE IF INSTRUCTED BY SOMEONE"
files: |
firmwares/*