-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(modem): host test support of the latest ESP-IDF release
- Loading branch information
1 parent
5ab699d
commit c4d6b50
Showing
9 changed files
with
58 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,12 @@ on: | |
upload_artifacts: | ||
type: boolean | ||
required: true | ||
run_executable: | ||
type: boolean | ||
required: false | ||
run_coverage: | ||
type: boolean | ||
required: true | ||
pre_run_script: | ||
type: string | ||
required: false | ||
|
@@ -51,14 +57,22 @@ jobs: | |
# The sdkconfig.ci.linux specifies Linux as the build target with apropriate settings. | ||
cp sdkconfig.ci.linux sdkconfig.defaults | ||
idf.py build | ||
./build/${{inputs.app_name}}.elf -r junit -o junit.xml | ||
if [ "${{ inputs.run_executable}}" == "false" ]; then | ||
exit 0 | ||
fi | ||
if [ "${{ inputs.publish_unit_test_result }}" == "true" ]; then | ||
./build/${{inputs.app_name}}.elf -r junit -o junit.xml | ||
else | ||
./build/${{inputs.app_name}}.elf | ||
fi | ||
- name: Publish Unit Test Result | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: ${{ inputs.publish_unit_test_result }} | ||
with: | ||
files: ${{inputs.component_path}}/**/*junit.xml | ||
- name: Build with Coverage Enabled | ||
shell: bash | ||
if: ${{ inputs.run_coverage }} | ||
run: | | ||
component=$(basename ${{ inputs.component_path }}) | ||
if [ -f "${{ inputs.pre_run_script }}" ]; then | ||
|
@@ -74,6 +88,7 @@ jobs: | |
./build/${{inputs.app_name}}.elf | ||
- name: Run Coverage | ||
shell: bash | ||
if: ${{ inputs.run_coverage }} | ||
run: | | ||
apt-get update && apt-get install -y python3-pip rsync | ||
python -m pip install gcovr | ||
|
@@ -86,6 +101,7 @@ jobs: | |
cp index.html ${{inputs.app_name}}_coverage_report | ||
cp -rf ${{inputs.app_name}}_coverage_report ${{inputs.app_name}}_coverage.xml $GITHUB_WORKSPACE | ||
- name: Code Coverage Summary Report | ||
if: ${{ inputs.run_coverage }} | ||
uses: irongut/[email protected] | ||
with: | ||
filename: esp-protocols/**/${{inputs.app_name}}_coverage.xml | ||
|
@@ -99,9 +115,10 @@ jobs: | |
thresholds: '60 80' | ||
- name: Write to Job Summary | ||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | ||
if: ${{ inputs.run_coverage }} | ||
- name: Upload files to artifacts for run-target job | ||
uses: actions/upload-artifact@v3 | ||
if: ${{inputs.upload_artifacts}} | ||
if: ${{ inputs.run_coverage }} | ||
with: | ||
name: ${{inputs.app_name}}_coverage_report | ||
path: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
espressif/catch2: "^3.4.0" | ||
idf: | ||
version: ">=5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters