-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (100 loc) · 4.06 KB
/
esp32.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
name: ESP32
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
#
# refs:
# - https://stackoverflow.com/questions/70435286/resource-not-accessible-by-integration-on-github-post-repos-owner-repo-ac
# - https://github.com/actions/cache/blob/6849a6489940f00c2f30c0fb92c6274307ccb58a/tips-and-workarounds.md?plain=1#L57
# - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions
actions: write
env:
PROJECT_PATH: project
IDF_PATH: esp-idf
IDF_VERSION: v5.3.1
CONFIGURATION_PATH_CCACHE: .env/ccache
CONFIGURATION_PATH_UNIT_TESTS: .env/esp32_configuration_unit_tests
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
path: ${{ env.PROJECT_PATH }}
- name: fmt check formatting
uses: ./project/.github/actions/core/fmt
with:
PROJECT_PATH: ${{ env.PROJECT_PATH }}
CONTROL_COMPONENTS_PATH: ${{ env.PROJECT_PATH }}
- name: esp32 setup env
uses: ./project/.github/actions/esp32/env
with:
IDF_PATH: ${{ env.IDF_PATH }}
IDF_VERSION: ${{ env.IDF_VERSION }}
- name: system setup env
uses: ./project/.github/actions/system/env
- name: system setup ccache
uses: ./project/.github/actions/system/ccache
with:
GITHUB_TOKEN: ${{ github.token }}
PROJECT_PATH: ${{ env.PROJECT_PATH }}
CONTROL_COMPONENTS_PATH: ${{ env.PROJECT_PATH }}
CONFIGURATION_PATH_CCACHE: ${{ env.CONFIGURATION_PATH_CCACHE }}
- name: core format firmware build version
id: version_formatter
uses: ./project/.github/actions/core/version
- name: unittests prepare configuration
shell: bash
run: |
echo "CONFIG_OCS_TEST_UNIT_WIFI_STA_ENABLED=y" >> ${{ env.CONFIGURATION_PATH_UNIT_TESTS }}
echo "CONFIG_OCS_CORE_FW_VERSION=\"${{ steps.version_formatter.outputs.build_version }}\"" >> ${{ env.CONFIGURATION_PATH_UNIT_TESTS }}
echo "CONFIG_OCS_CORE_FW_NAME=\"unittests\"" >> ${{ env.CONFIGURATION_PATH_UNIT_TESTS }}
- name: unittests build
uses: ./project/.github/actions/esp32/project
with:
IDF_PATH: ${{ env.IDF_PATH }}
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tests
CONFIGURATION_PATH_CCACHE: ${{ env.CONFIGURATION_PATH_CCACHE }}
CONFIGURATION_PATH_PROJECT: ${{ env.CONFIGURATION_PATH_UNIT_TESTS }}
- name: ds18b20-verifier build
uses: ./project/.github/actions/esp32/project
with:
IDF_PATH: ${{ env.IDF_PATH }}
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/ds18b20-verifier
- name: ds-rom-code-scanner build
uses: ./project/.github/actions/esp32/project
with:
IDF_PATH: ${{ env.IDF_PATH }}
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/ds-rom-code-scanner
- name: sht41-verifier build
uses: ./project/.github/actions/esp32/project
with:
IDF_PATH: ${{ env.IDF_PATH }}
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/sht41-verifier
- name: unittests upload
uses: ./project/.github/actions/esp32/upload
with:
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tests
PROJECT_ID: unittests
- name: ds18b20-verifier upload
uses: ./project/.github/actions/esp32/upload
with:
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/ds18b20-verifier
PROJECT_ID: ds18b20-verifier
- name: ds-rom-code-scanner upload
uses: ./project/.github/actions/esp32/upload
with:
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/ds-rom-code-scanner
PROJECT_ID: ds-rom-code-scanner
- name: sht41-verifier upload
uses: ./project/.github/actions/esp32/upload
with:
PROJECT_PATH: ${{ env.PROJECT_PATH }}/tools/sht41-verifier
PROJECT_ID: sht41-verifier