Skip to content

Commit c12e2a1

Browse files
authored
Merge pull request #7235 from MicroDev1/ci
Fix json parse issue in ci_set_matrix.py
2 parents 73a43aa + 7ea563e commit c12e2a1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ jobs:
140140
if: github.event_name == 'pull_request'
141141
uses: tj-actions/changed-files@v34
142142
with:
143-
json: "true"
143+
json: true
144144
sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }}
145145
base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }}
146146
- name: Set matrix
147147
id: set-matrix
148148
working-directory: tools
149149
env:
150-
CHANGED_FILES: ${{ toJSON(steps.get-changes.outputs.all_changed_and_modified_files) }}
150+
CHANGED_FILES: ${{ steps.get-changes.outputs.all_changed_and_modified_files }}
151151
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }}
152152
run: python3 -u ci_set_matrix.py
153153

tools/ci_set_matrix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
changed_files = []
7070
else:
7171
print("Using files list in CHANGED_FILES")
72-
changed_files = json.loads(c)
72+
changed_files = json.loads(c.replace("\\", ""))
7373

7474
j = os.environ["LAST_FAILED_JOBS"]
7575
if j == "":
@@ -203,7 +203,7 @@ def get_settings(board):
203203
# Split boards by architecture.
204204
print("Building boards:")
205205
arch_to_boards = {"aarch": [], "arm": [], "riscv": [], "espressif": []}
206-
for board in boards_to_build:
206+
for board in sorted(boards_to_build):
207207
print(" ", board)
208208
port = board_to_port.get(board)
209209
# A board can appear due to its _deletion_ (rare)
@@ -220,6 +220,7 @@ def get_settings(board):
220220
failed_boards = last_failed_jobs[f"build-{arch}"]
221221
for board in failed_boards:
222222
if not board in arch_to_boards[arch]:
223+
print(" ", board)
223224
arch_to_boards[arch].append(board)
224225
# Set Output
225226
set_output(f"boards-{arch}", json.dumps(sorted(arch_to_boards[arch])))

0 commit comments

Comments
 (0)