Skip to content

Commit 000ca6b

Browse files
committed
ci: support 32-bit builds
- support 32-bit builds - fix pre-commit formatting issues
1 parent c5e1313 commit 000ca6b

File tree

2 files changed

+81
-121
lines changed

2 files changed

+81
-121
lines changed

.github/workflows/build.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [windows-latest, ubuntu-latest, macos-latest]
20+
arch: [x64]
21+
include:
22+
- os: windows-latest
23+
arch: x86
2024
runs-on: ${{ matrix.os }}
2125

2226
steps:
@@ -26,6 +30,7 @@ jobs:
2630
uses: actions/setup-python@v2
2731
with:
2832
python-version: '3.x'
33+
architecture: ${{ matrix.arch }}
2934

3035
- name: Install dependencies
3136
run: |
@@ -36,19 +41,20 @@ jobs:
3641
- name: Build with PyInstaller (Windows)
3742
if: matrix.os == 'windows-latest'
3843
run: |
44+
$archSuffix = if ("${{ matrix.arch }}" -eq "x86") { "-x86" } else { "-x64" }
3945
if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") {
40-
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
46+
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
4147
} else {
42-
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
48+
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
4349
}
4450
4551
- name: Build with PyInstaller (Linux/macOS)
4652
if: matrix.os != 'windows-latest'
4753
run: |
4854
if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then
49-
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
55+
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
5056
else
51-
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
57+
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
5258
fi
5359
5460
- name: Copy additional files (Windows)
@@ -72,6 +78,6 @@ jobs:
7278
- name: Upload Artifact
7379
uses: actions/upload-artifact@v2
7480
with:
75-
name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
81+
name: AutoGGUF-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
7682
path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist
7783

0 commit comments

Comments
 (0)