diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e8b470..95f6124 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,33 +5,32 @@ name: Python Build on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: windows-latest steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - name: Dependencies - run: | - .\dependencies.bat - - name: Install PyInstaller - run: | - .\install_pyinstaller.bat - - name: Build - run: | - .\build.bat - - uses: actions/upload-artifact@v3 - with: - name: PBSync.windows - path: dist/PBSync.exe + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: 3.12 + - name: Dependencies + run: | + .\dependencies.bat + - name: Install PyInstaller + run: | + .\install_pyinstaller.bat + - name: Build + run: | + .\build.bat + - uses: actions/upload-artifact@v3 + with: + name: PBSync.windows + path: dist/PBSync.exe diff --git a/build.bat b/build.bat index 67449a9..5910ee6 100644 --- a/build.bat +++ b/build.bat @@ -4,4 +4,4 @@ set PYTHONOPTIMIZE=2 set PYTHONHASHSEED=0 set PYI_STATIC_ZLIB=1 set OBJECT_MODE=64 -pyinstaller --clean PBSync.spec %* +pipenv run pyinstaller --clean PBSync.spec %* diff --git a/dependencies.bat b/dependencies.bat index 2d92494..db9e4db 100644 --- a/dependencies.bat +++ b/dependencies.bat @@ -1,3 +1,4 @@ @echo off python -m pip install -U pip +python -m pip install -U pipenv python -m pipenv install diff --git a/install_pyinstaller.bat b/install_pyinstaller.bat index ef0b2e7..e89fe04 100644 --- a/install_pyinstaller.bat +++ b/install_pyinstaller.bat @@ -1,9 +1,2 @@ @echo off -git submodule update --init -cd pyinstaller -setlocal -cd bootloader -python ./waf all -cd .. -pip install . -cd .. +pipenv run .\install_pyinstaller_inner.bat diff --git a/install_pyinstaller_inner.bat b/install_pyinstaller_inner.bat new file mode 100644 index 0000000..ef0b2e7 --- /dev/null +++ b/install_pyinstaller_inner.bat @@ -0,0 +1,9 @@ +@echo off +git submodule update --init +cd pyinstaller +setlocal +cd bootloader +python ./waf all +cd .. +pip install . +cd ..