File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,18 @@ jobs:
7373 uses : actions/setup-python@v5
7474 with :
7575 python-version : 3.x
76+ - name : Board to port
77+ id : board-to-port
78+ run : |
79+ PORT=$(python tools/board_to_port.py "${{ inputs.board }}")
80+ echo "port=$PORT" >> $GITHUB_OUTPUT
81+ shell : bash
7682 - name : Set up port
7783 id : set-up-port
7884 uses : ./.github/actions/deps/ports
7985 with :
8086 board : ${{ inputs.board }}
87+ port : ${{ steps.board-to-port.outputs.port }}
8188 - name : Set up submodules
8289 id : set-up-submodules
8390 uses : ./.github/actions/deps/submodules
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ # SPDX-FileCopyrightText: 2025 CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
4+ #
5+ # SPDX-License-Identifier: MIT
6+
7+ import sys
8+ from pathlib import Path
9+
10+ docs = Path (__file__ ).parent .parent / "docs"
11+ sys .path .append (str (docs ))
12+ from shared_bindings_matrix import get_board_mapping
13+
14+ board = sys .argv [1 ]
15+
16+ board_mapping = get_board_mapping ()
17+ if board in board_mapping :
18+ board_info = board_mapping [board ]
19+ print (board_info ["port" ])
20+ sys .exit (0 )
21+
22+ raise ValueError (f"No port directory associated with the board tag given { board } ." )
You can’t perform that action at this time.
0 commit comments