Skip to content

Commit f447a92

Browse files
authored
ci(sizes): Sites test between master and 2.x branch (espressif#9755)
* ci(sizes): Sites test between master and 2.x branch * ci(sizes): Remove if as its manual trigger
1 parent 2122811 commit f447a92

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sizes Results (master-v2.x)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
# It's convenient to set variables for values used multiple times in the workflow
8+
SKETCHES_REPORTS_PATH: artifacts/sizes-report
9+
RESULT_SIZES_TEST_FILE: SIZES_TEST.md
10+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
11+
12+
jobs:
13+
sizes-test-results:
14+
name: Sizes Comparsion Results
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4 # This step checks out the repository's code at gh-pages branch
19+
with:
20+
ref: gh-pages
21+
22+
- name: Create folder structure
23+
run: |
24+
mkdir -p artifacts && cd artifacts
25+
mkdir -p sizes-report
26+
mkdir -p sizes-report/master
27+
mkdir -p sizes-report/pr
28+
29+
# master folder is a base for comparison
30+
# pr folder is for comparison with master
31+
- name: Download JSON file
32+
run: |
33+
mv master_cli_compile/*.json artifacts/sizes-report/pr/
34+
mv v2.x_cli_compile/*.json artifacts/sizes-report/master/
35+
36+
- name: Report results
37+
uses: P-R-O-C-H-Y/report-size-deltas@sizes_v2
38+
with:
39+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
40+
github-token: ${{ env.GITHUB_TOKEN }}
41+
destination-file: ${{ env.RESULT_SIZES_TEST_FILE }}
42+
43+
- name: Append file with action URL
44+
run:
45+
echo "/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" >> ${{ env.RESULT_SIZES_TEST_FILE }}
46+
47+
- name: Push to github repo
48+
run: |
49+
git config user.name github-actions
50+
git config user.email [email protected]
51+
git add ${{ env.RESULT_SIZES_TEST_FILE }}
52+
git commit -m "Generated Sizes Results (master-v2.x)"
53+
git push origin HEAD:gh-pages

0 commit comments

Comments
 (0)