-
Notifications
You must be signed in to change notification settings - Fork 6
129 lines (122 loc) · 3.6 KB
/
test-build-idf-apps.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Test Build IDF Apps
on:
pull_request:
paths:
- 'idf_build_apps/**'
push:
branches:
- main
env:
IDF_PATH: /opt/esp/idf
defaults:
run:
shell: bash
jobs:
build-python-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- run: |
pip install -U pip
pip install flit
flit build
- name: Upload built python packages
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/idf_build_apps-*.whl
build-apps-on-idf-env:
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test-old-idf-releases') }}
needs: build-python-packages
strategy:
matrix:
idf-branch: [ release-v5.0, release-v5.1, release-v5.2, release-v5.3 ]
runs-on: ubuntu-latest
container:
image: espressif/idf:${{ matrix.idf-branch }}
steps:
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: wheel
- name: Build the Apps
run: |
bash $IDF_PATH/install.sh
. $IDF_PATH/export.sh
pip install idf_build_apps-*.whl
cd $IDF_PATH/examples/get-started/hello_world
echo 'CONFIG_IDF_TARGET="esp32"' >sdkconfig.defaults
idf-build-apps build --build-dir build_@t --size-file size_info.json
test -f build_esp32/hello_world.bin
test -f build_esp32/size_info.json
test ! -f build_esp32s2/hello_world.bin
build-apps-on-idf-master:
runs-on: ubuntu-latest
container:
image: espressif/idf:latest
env:
FLIT_ROOT_INSTALL: 1
steps:
- uses: actions/checkout@v4
- name: Build the Apps
run: |
bash $IDF_PATH/install.sh
. $IDF_PATH/export.sh
pip install flit
flit install -s
python -m idf_build_apps build -vv -t esp32 \
-p $IDF_PATH/examples/get-started/hello_world \
--size-file size_info.json
pytest --cov idf_build_apps --cov-report term-missing:skip-covered --junit-xml pytest.xml | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml
build-apps-on-idf-8266:
runs-on: ubuntu-latest
container:
image: python:3
env:
TOOLCHAIN_DIR: ${HOME}/.espressif/tools
FLIT_ROOT_INSTALL: 1
strategy:
matrix:
branch:
- v3.4
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update \
&& apt install -y --no-install-recommends \
gcc \
git \
wget \
make \
libncurses-dev \
flex \
bison \
gperf
- name: Checkout the SDK
run: |
git clone --recursive --shallow-submodules \
--branch ${{ matrix.branch }} \
https://github.com/espressif/ESP8266_RTOS_SDK \
$IDF_PATH
- name: Install toolchain
run: |
${IDF_PATH}/install.sh
- name: Build Hello World
run: |
. ${IDF_PATH}/export.sh
pip install flit
flit install -s
idf-build-apps build -vv -t esp8266 \
--build-system make \
-p ${IDF_PATH}/examples/get-started/hello_world \
--build-dir build_@t \
--size-file size_info.json