@@ -54,105 +54,12 @@ jobs:
54
54
55
55
host_test_esp_modem :
56
56
if : contains(github.event.pull_request.labels.*.name, 'modem') || github.event_name == 'push'
57
- name : Host Tests
58
- runs-on : ubuntu-20.04
59
- container : espressif/idf:release-v4.3
60
- env :
61
- lwip : lwip-2.1.2
62
- lwip_contrib : contrib-2.1.0
63
- lwip_uri : http://download.savannah.nongnu.org/releases/lwip
64
- COMP_DIR : esp-protocols/components/esp_modem
65
- steps :
66
- - name : Checkout esp-protocols
67
- uses : actions/checkout@v3
68
- with :
69
- path : esp-protocols
70
-
71
- - name : Build and Test
72
- shell : bash
73
- run : |
74
- apt-get update && apt-get install -y gcc-8 g++-8
75
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
76
- export LWIP_PATH=`pwd`/${{ env.lwip }}
77
- export LWIP_CONTRIB_PATH=`pwd`/${{ env.lwip_contrib }}
78
- . ${IDF_PATH}/export.sh
79
- $GITHUB_WORKSPACE/${{ env.COMP_DIR }}/test/host_test/env.sh $lwip $lwip_uri $lwip_contrib
80
- cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/examples/linux_modem
81
- idf.py build
82
- cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/test/host_test
83
- idf.py build
84
- ./build/host_modem_test.elf -r junit -o junit.xml
85
-
86
- - name : Publish Results
87
- uses : EnricoMi/publish-unit-test-result-action@v1
88
- if : always()
89
- with :
90
- files : esp-protocols/components/esp_modem/test/host_test/junit.xml
91
-
92
- host_test_gcov_esp_modem :
93
- if : contains(github.event.pull_request.labels.*.name, 'modem') || github.event_name == 'push'
94
- name : Run gcovr on esp modem host test
95
- runs-on : ubuntu-22.04
96
- permissions :
97
- contents : write
98
- container : espressif/idf:release-v4.3
99
- env :
100
- lwip : lwip-2.1.2
101
- lwip_contrib : contrib-2.1.0
102
- lwip_uri : http://download.savannah.nongnu.org/releases/lwip
103
- COMP_DIR : esp-protocols/components/esp_modem
104
- steps :
105
- - name : Checkout esp-protocols
106
- uses : actions/checkout@v3
107
- with :
108
- path : esp-protocols
109
- repository : ' '
110
- persist-credentials : false
111
- - name : Build and Test
112
- shell : bash
113
- run : |
114
- apt-get update && apt-get install -y gcc-8 g++-8 python3-pip
115
- apt-get install -y rsync
116
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
117
- export DEBIAN_FRONTEND=noninteractive
118
- export LWIP_PATH=`pwd`/${{ env.lwip }}
119
- export LWIP_CONTRIB_PATH=`pwd`/${{ env.lwip_contrib }}
120
- . ${IDF_PATH}/export.sh
121
- ${{ env.COMP_DIR }}/test/host_test/env.sh $lwip $lwip_uri $lwip_contrib
122
- cd $GITHUB_WORKSPACE/${{ env.COMP_DIR }}/test/host_test
123
- cat sdkconfig.ci.coverage >> sdkconfig.defaults
124
- idf.py build
125
- ./build/host_modem_test.elf
126
- - name : Run gcovr
127
- shell : bash
128
- run : |
129
- python -m pip install gcovr
130
- cd $GITHUB_WORKSPACE/${{ env.COMP_DIR }}
131
- gcov-8 `find . -name "esp_modem*gcda" -printf '%h\n' | head -n 1`/*
132
- gcovr --gcov-ignore-parse-errors -g -k -r . --html index.html -x esp_modem_coverage.xml
133
- mkdir modem_coverage_report
134
- cp $GITHUB_WORKSPACE/${{ env.COMP_DIR }}/index.html modem_coverage_report
135
- cp -rf modem_coverage_report $GITHUB_WORKSPACE
136
- - name : Code Coverage Summary Report
137
- uses : irongut/CodeCoverageSummary@v1.3.0
138
- with :
139
- filename : esp-protocols/**/esp_modem_coverage.xml
140
- badge : true
141
- fail_below_min : false
142
- format : markdown
143
- hide_branch_rate : false
144
- hide_complexity : false
145
- indicators : true
146
- output : both
147
- thresholds : ' 60 80'
148
- - name : Write to Job Summary
149
- run : cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
150
-
151
- - name : Upload artifacts
152
- uses : actions/upload-artifact@v3
153
- if : always()
154
- with :
155
- name : modem_coverage_report
156
- path : |
157
- ${{ env.COMP_DIR }}/modem_coverage_report
158
- if-no-files-found : error
57
+ uses : " ./.github/workflows/run-host-tests.yml"
58
+ with :
59
+ idf_version : " release-v4.3"
60
+ app_name : " host_modem_test"
61
+ app_path : " esp-protocols/components/esp_modem/test/host_test"
62
+ component_path : " esp-protocols/components/esp_modem"
63
+ upload_artifacts : true
64
+ pre_run_script : " esp-protocols/components/esp_modem/test/host_test/env.sh"
65
+ publish_unit_test_result : true
0 commit comments