workflows: Move pyling to check workflow
This commit is contained in:
parent
f7e9375964
commit
9e3dc61419
3 changed files with 169 additions and 56 deletions
44
.github/workflows/checks.yml
vendored
Normal file
44
.github/workflows/checks.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
|
||||||
|
name: "Checks"
|
||||||
|
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'rare/**'
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'rare/**'
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pylint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
- name: Install Test Dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pylint
|
||||||
|
- name: Install Target Dependencies
|
||||||
|
run: |
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
pip3 install -r requirements-presence.txt
|
||||||
|
- name: Analysis with pylint
|
||||||
|
run: |
|
||||||
|
pylint -E rare --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5
|
|
@ -1,30 +1,12 @@
|
||||||
|
|
||||||
name: "Test"
|
name: "Release Tests"
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
|
||||||
pylint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Set up Python 3.10
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pylint
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install pypresence
|
|
||||||
- name: Analysing the code with pylint
|
|
||||||
run: |
|
|
||||||
pylint -E rare --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
deb-package:
|
deb-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -46,7 +28,8 @@ jobs:
|
||||||
makedeb -d
|
makedeb -d
|
||||||
mv *.deb Rare.deb
|
mv *.deb Rare.deb
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload to Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Rare.deb
|
name: Rare.deb
|
||||||
path: build/Rare.deb
|
path: build/Rare.deb
|
||||||
|
@ -72,7 +55,8 @@ jobs:
|
||||||
appimage-builder --skip-test
|
appimage-builder --skip-test
|
||||||
mv Rare-*.AppImage Rare.AppImage
|
mv Rare-*.AppImage Rare.AppImage
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload to Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Rare.AppImage
|
name: Rare.AppImage
|
||||||
path: Rare.AppImage
|
path: Rare.AppImage
|
||||||
|
@ -86,19 +70,38 @@ jobs:
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Dependencies
|
- name: Install build dependencies
|
||||||
|
run: pip3 install nuitka ordered-set
|
||||||
|
- name: Install target dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
pip3 install -r requirements-presence.txt
|
pip3 install -r requirements-presence.txt
|
||||||
- name: Build Dependencies
|
- name: Version
|
||||||
run: pip3 install nuitka ordered-set PyQt5-stubs
|
id: version
|
||||||
- name: Build
|
|
||||||
run: |
|
run: |
|
||||||
python -m nuitka --assume-yes-for-downloads --follow-imports --prefer-source-code --mingw64 --lto=no --jobs=2 --static-libpython=no --standalone --enable-plugin=anti-bloat --enable-plugin=pyqt5 --show-anti-bloat-changes --nofollow-import-to="*.tests" --nofollow-import-to="*.distutils" --include-package-data=qtawesome --include-data-dir=rare\resources\images=rare\resources\images --include-data-files=rare\resources\languages=rare\resources\languages="*.qm" --windows-icon-from-ico=rare\resources\images\Rare.ico --windows-company-name=Rare --windows-product-name=Rare --windows-file-description=rare.exe --windows-file-version=1.9.0 --windows-product-version=1.9.0 --windows-disable-console rare
|
git fetch --prune --unshallow
|
||||||
|
echo "::set-output name=tag_offset::$(git describe --long --tags)"
|
||||||
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
- name: Build
|
||||||
|
run: >-
|
||||||
|
python -m nuitka
|
||||||
|
--assume-yes-for-downloads
|
||||||
|
--follow-imports --prefer-source-code --mingw64 --lto=no --jobs=2 --static-libpython=no --standalone
|
||||||
|
--enable-plugin=anti-bloat --enable-plugin=pyqt5 --show-anti-bloat-changes --nofollow-import-to="*.tests"
|
||||||
|
--nofollow-import-to="*.distutils" --include-package-data=qtawesome
|
||||||
|
--include-data-dir=rare\resources\images=rare\resources\images
|
||||||
|
--include-data-files=rare\resources\languages=rare\resources\languages="*.qm"
|
||||||
|
--windows-icon-from-ico=rare\resources\images\Rare.ico
|
||||||
|
--windows-company-name=Rare --windows-product-name=Rare --windows-file-description=rare.exe
|
||||||
|
--windows-file-version=0.0.0.0
|
||||||
|
--windows-product-version=0.0.0.0
|
||||||
|
--windows-disable-console
|
||||||
|
rare
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload to Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Rare-Windows-Nuitka
|
name: Rare-Windows-${{ steps.version.outputs.tag_offset }}
|
||||||
path: rare.dist
|
path: rare.dist
|
||||||
|
|
||||||
cx_freeze:
|
cx_freeze:
|
||||||
|
@ -109,19 +112,28 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.9'
|
||||||
- name: Dependencies
|
- name: Install Build Dependencies
|
||||||
run: pip3 install -r requirements.txt
|
|
||||||
- name: cx_freeze
|
|
||||||
run: pip3 install --upgrade cx_freeze wheel
|
run: pip3 install --upgrade cx_freeze wheel
|
||||||
- name: pypresence
|
- name: Install Target Dependencies
|
||||||
run: pip3 install pypresence
|
run: |
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
pip3 install -r requirements-presence.txt
|
||||||
|
- name: Version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
git fetch --prune --unshallow
|
||||||
|
echo "::set-output name=tag_offset::$(git describe --long --tags)"
|
||||||
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python freeze.py bdist_msi
|
run: |
|
||||||
|
python freeze.py bdist_msi
|
||||||
|
mv dist/*.msi dist/Rare-Windows.msi
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- name: Upload to Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Rare-Windows.msi
|
name: Rare-Windows-${{ steps.version.outputs.tag_offset }}.msi
|
||||||
path: dist/*.msi
|
path: dist/*.msi
|
||||||
|
|
||||||
mac_os:
|
mac_os:
|
||||||
|
@ -144,8 +156,12 @@ jobs:
|
||||||
run: mv rare/__main__.py __main__.py
|
run: mv rare/__main__.py __main__.py
|
||||||
|
|
||||||
- name: run pyinstaller
|
- name: run pyinstaller
|
||||||
run: |
|
run: >-
|
||||||
pyinstaller -F --name Rare --add-data "rare/resources/languages/*:rare/resources/languages" --add-data "rare/resources/images/*:rare/resources/images/" --windowed --icon rare/resources/images/Rare.icns --hidden-import=legendary __main__.py
|
pyinstaller -F --name Rare
|
||||||
|
--add-data "rare/resources/languages/*:rare/resources/languages"
|
||||||
|
--add-data "rare/resources/images/*:rare/resources/images/"
|
||||||
|
--windowed --icon rare/resources/images/Rare.icns
|
||||||
|
--hidden-import=legendary __main__.py
|
||||||
|
|
||||||
- name: create dmg
|
- name: create dmg
|
||||||
run: |
|
run: |
|
83
.github/workflows/release.yml
vendored
83
.github/workflows/release.yml
vendored
|
@ -1,9 +1,12 @@
|
||||||
name: New Release
|
|
||||||
|
name: "Release"
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pypi-deploy:
|
pypi-deploy:
|
||||||
if: "!github.event.release.prerelease"
|
if: "!github.event.release.prerelease"
|
||||||
|
@ -48,7 +51,7 @@ jobs:
|
||||||
makedeb -d
|
makedeb -d
|
||||||
mv *.deb Rare.deb
|
mv *.deb Rare.deb
|
||||||
|
|
||||||
- name: Upload files to GitHub
|
- name: Upload to Releases
|
||||||
uses: svenstaro/upload-release-action@2.2.1
|
uses: svenstaro/upload-release-action@2.2.1
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -79,7 +82,7 @@ jobs:
|
||||||
mv Rare-*.AppImage Rare.AppImage
|
mv Rare-*.AppImage Rare.AppImage
|
||||||
mv Rare-*.AppImage.zsync Rare.AppImage.zsync
|
mv Rare-*.AppImage.zsync Rare.AppImage.zsync
|
||||||
|
|
||||||
- name: Upload AppImage to GitHub
|
- name: Upload to Releases
|
||||||
uses: svenstaro/upload-release-action@2.2.1
|
uses: svenstaro/upload-release-action@2.2.1
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -96,6 +99,49 @@ jobs:
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
|
nuitka:
|
||||||
|
runs-on: "windows-latest"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: pip3 install nuitka ordered-set
|
||||||
|
- name: Install target dependencies
|
||||||
|
run: |
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
pip3 install -r requirements-presence.txt
|
||||||
|
- name: Build
|
||||||
|
run: >-
|
||||||
|
python -m nuitka
|
||||||
|
--assume-yes-for-downloads
|
||||||
|
--follow-imports --prefer-source-code --mingw64 --lto=no --jobs=2 --static-libpython=no --standalone
|
||||||
|
--enable-plugin=anti-bloat --enable-plugin=pyqt5 --show-anti-bloat-changes --nofollow-import-to="*.tests"
|
||||||
|
--nofollow-import-to="*.distutils" --include-package-data=qtawesome
|
||||||
|
--include-data-dir=rare\resources\images=rare\resources\images
|
||||||
|
--include-data-files=rare\resources\languages=rare\resources\languages="*.qm"
|
||||||
|
--windows-icon-from-ico=rare\resources\images\Rare.ico
|
||||||
|
--windows-company-name=Rare --windows-product-name=Rare --windows-file-description=rare.exe
|
||||||
|
--windows-file-version=${{ github.event.release.tag_name }}
|
||||||
|
--windows-product-version=${{ github.event.release.tag_name }}
|
||||||
|
--windows-disable-console
|
||||||
|
rare
|
||||||
|
- name: Compress
|
||||||
|
run: |
|
||||||
|
python -c "import shutil; shutil.make_archive('Rare-Windows', 'zip', 'rare.dist')"
|
||||||
|
|
||||||
|
- name: Upload to Releases
|
||||||
|
uses: svenstaro/upload-release-action@2.2.1
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: Rare-Windows.zip
|
||||||
|
asset_name: Rare-Windows-${{ github.event.release.tag_name }}.zip
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
cx_freeze:
|
cx_freeze:
|
||||||
runs-on: "windows-latest"
|
runs-on: "windows-latest"
|
||||||
steps:
|
steps:
|
||||||
|
@ -104,24 +150,27 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.9'
|
||||||
- name: Dependencies
|
- name: Install Build Dependencies
|
||||||
run: pip3 install -r requirements.txt
|
|
||||||
- name: cx_freeze
|
|
||||||
run: pip3 install --upgrade cx_freeze wheel
|
run: pip3 install --upgrade cx_freeze wheel
|
||||||
|
- name: Install Target Dependencies
|
||||||
|
run: |
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
pip3 install -r requirements-presence.txt
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python freeze.py bdist_msi
|
run: |
|
||||||
|
python freeze.py bdist_msi
|
||||||
|
mv dist/*.msi dist/Rare-Windows.msi
|
||||||
|
|
||||||
- name: Rename File
|
- name: Upload to Releases
|
||||||
run: mv dist/*.msi dist/Rare.msi
|
|
||||||
- name: Upload to GitHub
|
|
||||||
uses: svenstaro/upload-release-action@2.2.1
|
uses: svenstaro/upload-release-action@2.2.1
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: dist/Rare.msi
|
file: dist/Rare-Windows.msi
|
||||||
asset_name: Rare-${{ github.event.release.tag_name }}.msi
|
asset_name: Rare-Windows-${{ github.event.release.tag_name }}.msi
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
mac_os:
|
mac_os:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -142,8 +191,12 @@ jobs:
|
||||||
run: mv rare/__main__.py __main__.py
|
run: mv rare/__main__.py __main__.py
|
||||||
|
|
||||||
- name: run pyinstaller
|
- name: run pyinstaller
|
||||||
run: |
|
run: >-
|
||||||
pyinstaller -F --name Rare --add-data "rare/resources/languages/*:rare/resources/languages" --add-data "rare/resources/images/*:rare/resources/images/" --windowed --icon rare/resources/images/Rare.icns --hidden-import=legendary __main__.py
|
pyinstaller -F --name Rare
|
||||||
|
--add-data "rare/resources/languages/*:rare/resources/languages"
|
||||||
|
--add-data "rare/resources/images/*:rare/resources/images/"
|
||||||
|
--windowed --icon rare/resources/images/Rare.icns
|
||||||
|
--hidden-import=legendary __main__.py
|
||||||
|
|
||||||
- name: create dmg
|
- name: create dmg
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue