fix json parse issue
This commit is contained in:
parent
c837ac4f3a
commit
7ea563e661
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -140,14 +140,14 @@ jobs:
|
|||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v34
|
||||||
with:
|
with:
|
||||||
json: "true"
|
json: true
|
||||||
sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }}
|
sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }}
|
||||||
base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }}
|
base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }}
|
||||||
- name: Set matrix
|
- name: Set matrix
|
||||||
id: set-matrix
|
id: set-matrix
|
||||||
working-directory: tools
|
working-directory: tools
|
||||||
env:
|
env:
|
||||||
CHANGED_FILES: ${{ toJSON(steps.get-changes.outputs.all_changed_and_modified_files) }}
|
CHANGED_FILES: ${{ steps.get-changes.outputs.all_changed_and_modified_files }}
|
||||||
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }}
|
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }}
|
||||||
run: python3 -u ci_set_matrix.py
|
run: python3 -u ci_set_matrix.py
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ else:
|
|||||||
changed_files = []
|
changed_files = []
|
||||||
else:
|
else:
|
||||||
print("Using files list in CHANGED_FILES")
|
print("Using files list in CHANGED_FILES")
|
||||||
changed_files = json.loads(c)
|
changed_files = json.loads(c.replace("\\", ""))
|
||||||
|
|
||||||
j = os.environ["LAST_FAILED_JOBS"]
|
j = os.environ["LAST_FAILED_JOBS"]
|
||||||
if j == "":
|
if j == "":
|
||||||
@ -203,7 +203,7 @@ def set_boards_to_build(build_all):
|
|||||||
# Split boards by architecture.
|
# Split boards by architecture.
|
||||||
print("Building boards:")
|
print("Building boards:")
|
||||||
arch_to_boards = {"aarch": [], "arm": [], "riscv": [], "espressif": []}
|
arch_to_boards = {"aarch": [], "arm": [], "riscv": [], "espressif": []}
|
||||||
for board in boards_to_build:
|
for board in sorted(boards_to_build):
|
||||||
print(" ", board)
|
print(" ", board)
|
||||||
port = board_to_port.get(board)
|
port = board_to_port.get(board)
|
||||||
# A board can appear due to its _deletion_ (rare)
|
# A board can appear due to its _deletion_ (rare)
|
||||||
@ -220,6 +220,7 @@ def set_boards_to_build(build_all):
|
|||||||
failed_boards = last_failed_jobs[f"build-{arch}"]
|
failed_boards = last_failed_jobs[f"build-{arch}"]
|
||||||
for board in failed_boards:
|
for board in failed_boards:
|
||||||
if not board in arch_to_boards[arch]:
|
if not board in arch_to_boards[arch]:
|
||||||
|
print(" ", board)
|
||||||
arch_to_boards[arch].append(board)
|
arch_to_boards[arch].append(board)
|
||||||
# Set Output
|
# Set Output
|
||||||
set_output(f"boards-{arch}", json.dumps(sorted(arch_to_boards[arch])))
|
set_output(f"boards-{arch}", json.dumps(sorted(arch_to_boards[arch])))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user