-
Notifications
You must be signed in to change notification settings - Fork 25
85 lines (82 loc) · 2.64 KB
/
job_nuitka-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: job_nuitka-linux
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
build:
name: Package
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v5
with:
cache: pip
python-version: '3.12'
check-latest: true
architecture: x64
- name: Install build dependencies
run: pip3 install nuitka
- name: Install target dependencies
run: |
pip3 install -r misc/requirements.in
- name: Generate version information
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ inputs.version }}
run: |
python3 -m setuptools_scm --force-write-version-files
- name: Build
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ inputs.version }}
run: >-
python -m nuitka
--assume-yes-for-downloads
--show-scons
--clang
--lto=no
--jobs=4
--static-libpython=no
--standalone
--enable-plugin=anti-bloat
--enable-plugin=pyside6
--show-modules
--show-anti-bloat-changes
--follow-stdlib
--follow-imports
--nofollow-import-to="*.tests"
--nofollow-import-to="*.distutils"
--nofollow-import-to="distutils"
--nofollow-import-to="unittest"
--nofollow-import-to="pydoc"
--nofollow-import-to="tkinter"
--nofollow-import-to="test"
--prefer-source-code
--include-package=pypresence
--include-package-data=qtawesome
--include-data-dir=rare/resources/images/=rare/resources/images/
--include-data-files=rare/resources/languages/rare_*.qm=rare/resources/languages/
--output-filename=Rare.bin
--file-description=Rare.bin
--company-name=RareDevs
--product-name=Rare
--file-version=${{ inputs.version }}
--product-version=${{ inputs.version }}
rare
- name: Strip
run: |
find rare.dist -iname "*.so*" -type f -exec strip --strip-all {} \;
strip --strip-all rare.dist/Rare.bin
- name: Compress
run: |
mv rare.dist Rare-${{ inputs.version }}
python -c "import shutil; shutil.make_archive('Rare-${{ inputs.version }}', 'zip', '.', 'Rare-${{ inputs.version }}')"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Rare-${{ inputs.version }}-linux.zip
path: Rare-${{ inputs.version }}.zip