Debian Codegraph @

.github/workflows/pyinstaller-macos-intel.yml

raw
1 # GitHub Action for building dirsearch with PyInstaller (macOS Intel)
2
3 name: PyInstaller macOS Intel
4
5 on:
6 workflow_dispatch:
7 workflow_call:
8
9 env:
10 PYTHON_VERSION: '3.11'
11 PYINSTALLER_VERSION: '6.16.0'
12
13 jobs:
14 build-macos-intel:
15 name: Build macOS Intel (${{ matrix.variant.name }})
16 runs-on: macos-15-large
17 timeout-minutes: 30
18 strategy:
19 fail-fast: false
20 matrix:
21 variant:
22 - name: threaded
23 async: "False"
24 - name: async
25 async: "True"
26 steps:
27 - name: Checkout repository
28 uses: actions/checkout@v4
29
30 - name: Set up Python
31 uses: actions/setup-python@v5
32 with:
33 python-version: ${{ env.PYTHON_VERSION }}
34 cache: 'pip'
35
36 - name: Install dependencies
37 run: |
38 python -m pip install --upgrade pip setuptools wheel
39 pip install -r requirements.txt
40 pip install pyinstaller==${{ env.PYINSTALLER_VERSION }}
41
42 - name: Set default async mode
43 run: |
44 sed -i '' "s/^async = .*/async = ${{ matrix.variant.async }}/" config.ini
45
46 - name: Build macOS Intel binary
47 run: |
48 python -m PyInstaller \
49 --clean \
50 pyinstaller/dirsearch.spec
51
52 - name: Rename binary
53 run: mv dist/dirsearch dist/dirsearch-macos-intel-${{ matrix.variant.name }}
54
55 - name: Test macOS Intel binary
56 run: |
57 ./dist/dirsearch-macos-intel-${{ matrix.variant.name }} --version
58 ./dist/dirsearch-macos-intel-${{ matrix.variant.name }} --help
59
60 - name: Upload macOS Intel artifact
61 uses: actions/upload-artifact@v4
62 with:
63 name: dirsearch-macos-intel-${{ matrix.variant.name }}
64 path: dist/dirsearch-macos-intel-${{ matrix.variant.name }}
65 retention-days: 30