Skip to content

Commit

Permalink
fix(ci): use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhhleyyy committed Mar 29, 2024
1 parent 0e13dc0 commit 5409758
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
Expand Down Expand Up @@ -91,6 +93,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
Expand Down
4 changes: 2 additions & 2 deletions build/build-exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
file.close()

if isLinux():
cmd_str = "python3 -m PyInstaller "
cmd_str = "poetry run python3 -m PyInstaller "
else:
cmd_str = "pyinstaller "
cmd_str = "poetry run pyinstaller "

json_dests = ["icon_file", "clean_build"]
pyi_dests = ["icon", "clean"]
Expand Down
7 changes: 2 additions & 5 deletions build/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ echo "BRANCH: str = \"$build_branch\"" >> ../build.py
sudo apt install libportaudio2
sudo apt install python3-pip python3-venv ffmpeg

python3 -m venv ../venv
source ../venv/bin/activate

poetry install

python3 ./generate-build-exe-config.py
poetry run python3 ./generate-build-exe-config.py

chmod +x output/BAPSicle

python3 ./build-exe.py
poetry run python3 ./build-exe.py

bash ./build-exe-pyinstaller-command.sh

Expand Down
9 changes: 3 additions & 6 deletions build/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ build_branch="$(git branch --show-current)"
echo "BUILD: str = \"$build_commit\"" > ../build.py
echo "BRANCH: str = \"$build_branch\"" >> ../build.py

python3 -m venv ../venv
source ../venv/bin/activate

poetry install

python3 ./generate-build-exe-config.py
poetry run python3 ./generate-build-exe-config.py

python3 ./build-exe.py
poetry run python3 ./build-exe.py

bash ./build-exe-pyinstaller-command.sh

rm ./*.spec

cd ../
python3 build/generate-platypus-config.py
poetry run python3 build/generate-platypus-config.py
cd build

brew install platypus
Expand Down
11 changes: 2 additions & 9 deletions build/build-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,14 @@ SET build_branch=%%F
echo BUILD: str = "%build_commit%"> ..\build.py
echo BRANCH: str = "%build_branch%">> ..\build.py

if "%1" == "no-venv" goto skip-venv

py -m venv ..\venv
..\venv\Scripts\activate

:skip-venv

poetry install

: Generate the json config in case you wanted to use the gui to regenerate the command below manually.
python generate-build-exe-config.py
poetry run python generate-build-exe-config.py

: auto-py-to-exe -c build-exe-config.json -o ../install

python build-exe.py
poetry run python build-exe.py

build-exe-pyinstaller-command.bat

Expand Down

0 comments on commit 5409758

Please sign in to comment.