-
Notifications
You must be signed in to change notification settings - Fork 638
101 lines (97 loc) · 2.67 KB
/
push.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: PlatformIO Build
on:
push:
branches:
- dev
- 'test/**'
tags-ignore: '**'
pull_request:
branches: [dev]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache CMake
uses: actions/cache@v4
with:
path: code/test/unit/cache
key: ${{ runner.os }}-cmake-${{ hashFiles('code/test/unit/CMakeLists.txt') }}
- name: Host tests
run: |
./ci_install.sh host
./ci_script.sh host
webui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache Node
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('code/package-lock.json', 'code/package.json') }}
- name: WebUI tests
run: |
./ci_install.sh webui
./ci_script.sh webui
- name: Archive blobs
run: |
pushd code/html/
time zip \
--quiet \
--recurse-paths \
WebUI-${{ github.sha }}.zip build/
mv WebUI-${{ github.sha }}.zip ../../
popd
- uses: actions/upload-artifact@v4
with:
name: WebUI-${{ github.sha }}
path: WebUI-${{ github.sha }}.zip
build:
runs-on: ubuntu-latest
strategy:
matrix:
env: [nodemcu-lolin, esp8266-4m-base, esp8266-4m-latest-base]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('ci_install.sh') }}
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-build-${{ matrix.env }}-${{ hashFiles('code/platformio.ini') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.env }}-
${{ runner.os }}-build-
- name: Cache libraries
uses: actions/cache@v4
with:
path: libraries/
key: ${{ runner.os }}-libraries-${{ hashFiles('code/platformio.ini') }}
restore-keys: |
${{ runner.os }}-libraries-
- name: PlatformIO prepare
run: |
git config --global advice.detachedHead false
./ci_install.sh build ${{ matrix.env }}
- if: ${{ matrix.env == 'nodemcu-lolin' }}
name: Basic build
run: |
./ci_script.sh build ${{ matrix.env }}
- if: ${{ endsWith(matrix.env, '-base') }}
name: Test build
run: |
./ci_script.sh test ${{ matrix.env }}