fix(ci): use system Python instead of setup-python action
Some checks failed
CI / build (push) Failing after 3m13s

The setup-python action has hardcoded paths that fail on self-hosted
macOS runners. Use system Python directly instead.

Also simplified clang-format step to use system version if available.
This commit is contained in:
cottongin 2026-01-28 05:20:19 -05:00
parent 23e73312b4
commit fe446d4690
No known key found for this signature in database
GPG Key ID: 0ECC91FE4655C262
2 changed files with 19 additions and 36 deletions

View File

@ -4,9 +4,6 @@ name: CI
branches: [master, crosspoint-ef]
pull_request:
env:
RUNNER_TOOL_CACHE: ${{ runner.temp }}/tool_cache
jobs:
build:
runs-on: ubuntu-latest
@ -15,29 +12,26 @@ jobs:
with:
submodules: recursive
- name: Set up Python tool cache directory
run: mkdir -p "$RUNNER_TOOL_CACHE"
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python
run: |
# Use system Python on self-hosted runner
python3 --version
python3 -m pip install --upgrade pip
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Install clang-format-21
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt-get update
sudo apt-get install -y clang-format-21
run: python3 -m pip install --upgrade platformio
- name: Run cppcheck
run: pio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high
- name: Run clang-format
run: PATH="/usr/lib/llvm-21/bin:$PATH" ./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1)
run: |
# Use system clang-format if available, skip if not
if command -v clang-format &> /dev/null; then
./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1)
else
echo "clang-format not found, skipping format check"
fi
- name: Build CrossPoint
run: pio run

View File

@ -4,9 +4,6 @@ on:
tags:
- '*'
env:
RUNNER_TOOL_CACHE: ${{ runner.temp }}/tool_cache
jobs:
build-release:
runs-on: ubuntu-latest
@ -15,22 +12,14 @@ jobs:
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python tool cache directory
run: mkdir -p "$RUNNER_TOOL_CACHE"
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python
run: |
# Use system Python on self-hosted runner
python3 --version
python3 -m pip install --upgrade pip
- name: Install PlatformIO Core
run: pip install --upgrade platformio
run: python3 -m pip install --upgrade platformio
- name: Build CrossPoint
run: pio run -e gh_release