2024-05-17 15:28:56 +08:00
|
|
|
name: Setup Python and SCons
|
|
|
|
description: Setup Python, install the pip version of SCons.
|
2024-07-08 23:41:20 +08:00
|
|
|
|
2021-09-01 23:26:01 +08:00
|
|
|
inputs:
|
|
|
|
python-version:
|
2024-05-17 15:28:56 +08:00
|
|
|
description: The Python version to use.
|
2024-07-08 23:41:20 +08:00
|
|
|
default: 3.x
|
2021-09-01 23:26:01 +08:00
|
|
|
python-arch:
|
2024-05-17 15:28:56 +08:00
|
|
|
description: The Python architecture.
|
2024-07-08 23:41:20 +08:00
|
|
|
default: x64
|
2024-05-17 15:28:56 +08:00
|
|
|
scons-version:
|
|
|
|
description: The SCons version to use.
|
2024-11-17 03:16:48 +08:00
|
|
|
default: 4.8.1
|
2024-07-08 23:41:20 +08:00
|
|
|
|
2021-09-01 23:26:01 +08:00
|
|
|
runs:
|
2024-07-08 23:41:20 +08:00
|
|
|
using: composite
|
2021-09-01 23:26:01 +08:00
|
|
|
steps:
|
|
|
|
- name: Set up Python 3.x
|
2024-02-22 23:22:54 +08:00
|
|
|
uses: actions/setup-python@v5
|
2021-09-01 23:26:01 +08:00
|
|
|
with:
|
2024-05-17 15:28:56 +08:00
|
|
|
# Semantic version range syntax or exact version of a Python version.
|
2021-09-01 23:26:01 +08:00
|
|
|
python-version: ${{ inputs.python-version }}
|
2024-05-17 15:28:56 +08:00
|
|
|
# Optional - x64 or x86 architecture, defaults to x64.
|
2021-09-01 23:26:01 +08:00
|
|
|
architecture: ${{ inputs.python-arch }}
|
|
|
|
|
2024-05-17 15:28:56 +08:00
|
|
|
- name: Setup SCons
|
2021-09-01 23:26:01 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
python -c "import sys; print(sys.version)"
|
2024-05-17 15:28:56 +08:00
|
|
|
python -m pip install scons==${{ inputs.scons-version }}
|
2021-09-01 23:26:01 +08:00
|
|
|
scons --version
|
2024-11-28 02:33:42 +08:00
|
|
|
|
|
|
|
- name: Setup problem matchers
|
|
|
|
shell: bash
|
|
|
|
run: echo ::add-matcher::misc/utility/problem-matchers.json
|