Skip to content

Commit

Permalink
Merge pull request #800 from ladyisatis/feature/build_fixes
Browse files Browse the repository at this point in the history
Build speed-up
  • Loading branch information
joaorb64 authored Jan 9, 2025
2 parents aab3a35 + 6452643 commit 9f8bea9
Show file tree
Hide file tree
Showing 15 changed files with 966 additions and 1,003 deletions.
81 changes: 22 additions & 59 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,20 @@ on:
workflow_dispatch:

jobs:
locale_build:
name: Build locale files
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch

- run: |
sudo apt-get update
sudo apt-get install -y libgstreamer-plugins-base1.0-dev
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev-tools
lrelease -version
- run: pip install -r dependencies/requirements.txt pyinstaller
- run: |
python3 src/i18n/gen_translation_files.py
python3 src/i18n/gen_translation_binaries.py
- run: git pull
- name: commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add *
if ! git diff-index --quiet HEAD; then
git commit -m "Update locale files" -a
fi
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}

build:
name: Generate Windows Release
name: Generate Windows Release with Locale Files
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/heads/feature/' ) || startsWith( github.ref, 'refs/heads/fix/' ) }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest"]
needs:
- locale_build

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -79,24 +34,32 @@ jobs:
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch

- run: pip install -r dependencies/requirements.txt pyinstaller
- run: |
- name: Install Python dependencies
run: pip install -r .\dependencies\requirements.txt pyinstaller

- name: Generate locale files
run: |
pyside6-lrelease -version
python3 .\src\i18n\gen_translation_files.py
python3 .\src\i18n\gen_translation_binaries.py
- name: Generate TSH Windows executable
run: |
set PYTHONUTF8=1
chcp 65001
set PYTHONIOENCODING=utf-8
python scripts/gen_contributors.py
pyinstaller --noconfirm dependencies/tsh.spec
python .\scripts\gen_contributors.py
pyinstaller --noconfirm .\dependencies\tsh.spec
copy dist\TSH.exe TSH.exe
- run: git pull
- name: commit files
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add TSH.exe
git commit -m "Update exe" -a
git add TSH.exe .\src\i18n\*.ts
git commit -m "Update exe and locale files" -a
- name: push changes
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
shell: pwsh
run: |
cd scripts
./gen_release.ps1
.\gen_release.ps1
- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
Binary file modified TSH.exe
Binary file not shown.
30 changes: 15 additions & 15 deletions dependencies/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
chardet==5.1.0
charset-normalizer==2.1.0
chardet
charset-normalizer==3.4.1
qtpy
requests==2.28.1
py7zr==0.19.0
deepdiff==7.0.1
git+https://github.com/woopelderly/PyQtDarkTheme@python3.12
requests==2.32.3
py7zr==0.22.0
deepdiff==8.1.1
pyqtdarktheme-fork
Pillow
Flask
flask-cors
asyncio
python-dateutil==2.8.2
pynput==1.7.6
pyside6==6.7.0
python-dateutil==2.9.0
pynput==1.7.7
pyside6==6.8.1
cloudscraper==1.2.71
loguru==0.7.0
loguru==0.7.3
flask-socketio
simple_websocket
termcolor==2.3.0
orjson==3.9.9
msgpack==1.0.7
qasync==0.26.0
tzdata
termcolor==2.5.0
orjson==3.10.13
msgpack==1.1.0
qasync==0.27.1
tzdata
Loading

0 comments on commit 9f8bea9

Please sign in to comment.