Skip to content

Commit

Permalink
ci: support 32-bit builds
Browse files Browse the repository at this point in the history
- support 32-bit builds
- fix pre-commit formatting issues
  • Loading branch information
leafspark committed Aug 16, 2024
1 parent c5e1313 commit 000ca6b
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 121 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
arch: [x64]
include:
- os: windows-latest
arch: x86
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -26,6 +30,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: ${{ matrix.arch }}

- name: Install dependencies
run: |
Expand All @@ -36,19 +41,20 @@ jobs:
- name: Build with PyInstaller (Windows)
if: matrix.os == 'windows-latest'
run: |
$archSuffix = if ("${{ matrix.arch }}" -eq "x86") { "-x86" } else { "-x64" }
if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") {
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\release\dist --workpath=build\release\build --specpath=build\release src\main.py
pyinstaller --windowed --onefile --name=AutoGGUF$archSuffix --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\release\dist --workpath=build\release\build --specpath=build\release src\main.py
} else {
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\dev\dist --workpath=build\dev\build --specpath=build\dev src\main.py
pyinstaller --onefile --name=AutoGGUF$archSuffix --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\dev\dist --workpath=build\dev\build --specpath=build\dev src\main.py
}
- name: Build with PyInstaller (Linux/macOS)
if: matrix.os != 'windows-latest'
run: |
if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/release/dist --workpath=build/release/build --specpath=build/release src/main.py
pyinstaller --windowed --onefile --name=AutoGGUF-x64 --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/release/dist --workpath=build/release/build --specpath=build/release src/main.py
else
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py
pyinstaller --onefile --name=AutoGGUF-x64 --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py
fi
- name: Copy additional files (Windows)
Expand All @@ -72,6 +78,6 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
name: AutoGGUF-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist

Loading

0 comments on commit 000ca6b

Please sign in to comment.