Skip to content

Commit 4b3c07f

Browse files
authored
Merge pull request #579 from espressif/ci/run_everymidnight
ci(build): Build and run all on master every midnight + fixed benchmarks on master
2 parents 5705ac7 + c535209 commit 4b3c07f

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/build-run-applications.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
push:
1010
branches:
1111
- master
12+
schedule:
13+
- cron: '0 0 * * *' # every day at midnight
1214
workflow_dispatch:
1315
inputs:
1416
WFType:

examples/display_lvgl_benchmark/pytest_display_lvgl_benchmark.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: CC0-1.0
33

4+
import os
45
import datetime
56
import json
67
from pathlib import Path
@@ -35,6 +36,8 @@ def find_test_results(json_obj, test):
3536

3637

3738
def get_test_diff(test1, test2, name, positive):
39+
if os.getenv("GITHUB_REF_NAME") == "master":
40+
return ""
3841
if not test1 or not test2 or not test1[name] or not test2[name]:
3942
return ""
4043
test1[name] = test1[name].replace("%", "")
@@ -78,7 +81,10 @@ def test_example(dut: Dut, request) -> None:
7881
}
7982

8083
# Write board into file
81-
write_to_file(board, ".md", f"# Benchmark for BOARD " + board + "\n\n")
84+
if os.getenv("GITHUB_REF_NAME") == "master":
85+
write_to_file(board, ".md", f"## LVGL Benchmark\n\n")
86+
else:
87+
write_to_file(board, ".md", f"# Benchmark for BOARD " + board + "\n\n")
8288
write_to_file(board, ".md", f"**DATE:** " + date.strftime('%d.%m.%Y %H:%M') + "\n\n")
8389
# Get LVGL version write it into file
8490
outdata = dut.expect(r'Benchmark Summary \((.*) \)', timeout=200)
@@ -114,8 +120,10 @@ def test_example(dut: Dut, request) -> None:
114120
test_entry["Flush time"] + " " + get_test_diff(test_entry, last_test_result, "Flush time", False) + " |\n")
115121

116122
write_to_file(board, ".md", "\n")
117-
write_to_file(board, ".md", "***")
118-
write_to_file(board, ".md", "\n\n")
123+
124+
if os.getenv("GITHUB_REF_NAME") != "master":
125+
write_to_file(board, ".md", "***")
126+
write_to_file(board, ".md", "\n\n")
119127

120128
# Save JSON to file
121129
json_output = json.dumps(output, indent=4)

0 commit comments

Comments
 (0)