|
1 |
| -name: Build PyInstaller App |
| 1 | +name: Build AutoGGUF (PyInstaller) |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
|
31 | 31 | run: |
|
32 | 32 | python -m pip install --upgrade pip
|
33 | 33 | pip install $(grep -v "^torch" requirements.txt)
|
34 |
| - pip install pyinstaller |
| 34 | + pip install pyinstaller pillow |
35 | 35 |
|
36 | 36 | - name: Build with PyInstaller (Windows)
|
37 | 37 | if: matrix.os == 'windows-latest'
|
|
51 | 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
|
52 | 52 | fi
|
53 | 53 |
|
| 54 | + - name: Copy additional files (Windows) |
| 55 | + if: matrix.os == 'windows-latest' |
| 56 | + run: | |
| 57 | + $distPath = if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { "build\release\dist" } else { "build\dev\dist" } |
| 58 | + New-Item -ItemType Directory -Force -Path "$distPath\src\gguf-py" |
| 59 | + Copy-Item -Path "src\gguf-py\*" -Destination "$distPath\src\gguf-py" -Recurse |
| 60 | + Copy-Item -Path "src\convert_lora_to_gguf.py" -Destination "$distPath\src" |
| 61 | + Copy-Item -Path "src\convert_lora_to_ggml.py" -Destination "$distPath\src" |
| 62 | +
|
| 63 | + - name: Copy additional files (Linux/macOS) |
| 64 | + if: matrix.os != 'windows-latest' |
| 65 | + run: | |
| 66 | + distPath=$(if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then echo "build/release/dist"; else echo "build/dev/dist"; fi) |
| 67 | + mkdir -p $distPath/src/gguf-py |
| 68 | + cp -R src/gguf-py/* $distPath/src/gguf-py/ |
| 69 | + cp src/convert_lora_to_gguf.py $distPath/src/ |
| 70 | + cp src/convert_lora_to_ggml.py $distPath/src/ |
| 71 | +
|
54 | 72 | - name: Upload Artifact
|
55 | 73 | uses: actions/upload-artifact@v2
|
56 | 74 | with:
|
57 | 75 | name: AutoGGUF-${{ matrix.os }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
|
58 |
| - path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF* |
| 76 | + path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist |
| 77 | + |
0 commit comments