fix(ci): use poetry

This commit is contained in:
Ashhhleyyy 2024-03-29 16:38:10 +00:00
parent 0e13dc08da
commit 54097583b3
Signed by: ash
GPG key ID: 83B789081A0878FB
5 changed files with 13 additions and 22 deletions

View file

@ -55,6 +55,8 @@ jobs:
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }} - name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v2
@ -91,6 +93,8 @@ jobs:
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }} - name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2 uses: actions/setup-node@v2

View file

@ -6,9 +6,9 @@ config = json.loads(file.read())
file.close() file.close()
if isLinux(): if isLinux():
cmd_str = "python3 -m PyInstaller " cmd_str = "poetry run python3 -m PyInstaller "
else: else:
cmd_str = "pyinstaller " cmd_str = "poetry run pyinstaller "
json_dests = ["icon_file", "clean_build"] json_dests = ["icon_file", "clean_build"]
pyi_dests = ["icon", "clean"] pyi_dests = ["icon", "clean"]

View file

@ -11,16 +11,13 @@ echo "BRANCH: str = \"$build_branch\"" >> ../build.py
sudo apt install libportaudio2 sudo apt install libportaudio2
sudo apt install python3-pip python3-venv ffmpeg sudo apt install python3-pip python3-venv ffmpeg
python3 -m venv ../venv
source ../venv/bin/activate
poetry install poetry install
python3 ./generate-build-exe-config.py poetry run python3 ./generate-build-exe-config.py
chmod +x output/BAPSicle chmod +x output/BAPSicle
python3 ./build-exe.py poetry run python3 ./build-exe.py
bash ./build-exe-pyinstaller-command.sh bash ./build-exe-pyinstaller-command.sh

View file

@ -8,21 +8,18 @@ build_branch="$(git branch --show-current)"
echo "BUILD: str = \"$build_commit\"" > ../build.py echo "BUILD: str = \"$build_commit\"" > ../build.py
echo "BRANCH: str = \"$build_branch\"" >> ../build.py echo "BRANCH: str = \"$build_branch\"" >> ../build.py
python3 -m venv ../venv
source ../venv/bin/activate
poetry install 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 bash ./build-exe-pyinstaller-command.sh
rm ./*.spec rm ./*.spec
cd ../ cd ../
python3 build/generate-platypus-config.py poetry run python3 build/generate-platypus-config.py
cd build cd build
brew install platypus brew install platypus

View file

@ -10,21 +10,14 @@ SET build_branch=%%F
echo BUILD: str = "%build_commit%"> ..\build.py echo BUILD: str = "%build_commit%"> ..\build.py
echo BRANCH: str = "%build_branch%">> ..\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 poetry install
: Generate the json config in case you wanted to use the gui to regenerate the command below manually. : 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 : 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 build-exe-pyinstaller-command.bat