Update pyinstaller_release.yaml #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyInstaller Release Builds | |
on: | |
push: | |
branches: [ main, develop ] | |
workflow_dispatch: | |
jobs: | |
pyinstaller_build: | |
name: Build for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest, ubuntu-24.04-arm] | |
include: | |
- os: windows-latest | |
artifact_name: pyocd-windows | |
- os: ubuntu-latest | |
artifact_name: pyocd-linux | |
- os: macos-latest | |
artifact_name: pyocd-macos | |
- os: ubuntu-24.04-arm | |
artifact_name: pyocd-linux-arm64 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
cache: 'pip' | |
- name: Install package | |
run: pip install . | |
- name: Setup build environment | |
id: setup | |
run: python get_site-packages.py | |
- name: Verify environment | |
run: | | |
echo "Site packages: ${{ env.SITE_PACKAGES }}" | |
python -c "import sys; print(sys.version)" | |
- name: Build with PyInstaller | |
run: | | |
pip install pyinstaller | |
pyinstaller pyocd.spec --log-level=ERROR --clean | |
- name: Test binary | |
run: ./dist/pyocd/pyocd --help | |
if: success() | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: dist/pyocd/* | |
retention-days: 7 |