-
Notifications
You must be signed in to change notification settings - Fork 32
198 lines (191 loc) · 8.35 KB
/
build.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: PyInstaller build
on: [push]
jobs:
build_ubuntu_20_04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.11 x64
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install --upgrade Pillow
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py
run: python3 -m PyInstaller Catmaker.spec
- name: Create archive (.tar.xz)
run: tar -caf Catmaker_Linux64_glibc2.31+.tar.xz -C dist Catmaker
- uses: actions/upload-artifact@v3
with:
name: Catmaker_Linux64_glibc2.31+.tar.xz
path: Catmaker_Linux64_glibc2.31+.tar.xz
build_ubuntu_22_04:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.11 x64
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install --upgrade Pillow
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py
run: python3 -m PyInstaller Catmaker.spec
- name: Create archive (.tar.xz)
run: tar -caf Catmaker_Linux64_glibc2.35+.tar.xz -C dist Catmaker
- uses: actions/upload-artifact@v3
with:
name: Catmaker_Linux64_glibc2.35+.tar.xz
path: Catmaker_Linux64_glibc2.35+.tar.xz
build_win32:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.8 x86
uses: actions/setup-python@v4
with:
python-version: '3.8' # 3.8 to support older versions of Windows
architecture: 'x86'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install Pillow==9.4.0
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py
run: python -m PyInstaller Catmaker.spec
- name: Create archive (.zip)
run: tar.exe -a -c -f Catmaker_Win32.zip -C dist Catmaker
- uses: actions/upload-artifact@v3
with:
name: Catmaker_Win32
path: Catmaker_Win32.zip
build_win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.8 x86
uses: actions/setup-python@v4
with:
python-version: '3.8' # 3.8 to support older versions of Windows
architecture: 'x86'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install Pillow==9.4.0
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py
run: python -m PyInstaller Catmaker.spec
- name: Create archive (.zip)
run: tar.exe -a -c -f Catmaker_Win32.zip -C dist Catmaker
- uses: actions/upload-artifact@v3
with:
name: Catmaker_Win32
path: Catmaker_Win32.zip
build_win64_py311:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.11 x64
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install --upgrade Pillow
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
# Example of an upx install, also requires adding "--upx-dir upx-4.0.0-win64" to the pyinst run
#- name: Setup UPX
# run: |
# curl -L -O https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-win64.zip
# tar.exe -x -v -f upx-4.0.0-win64.zip
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py
run: python -m PyInstaller Catmaker.spec
- name: Create archive (.zip)
run: tar.exe -a -c -f Catmaker_Win64_Windows10+.zip -C dist Catmaker
- uses: actions/upload-artifact@v3
with:
name: Catmaker_Win64_Windows10+
path: Catmaker_Win64_Windows10+.zip
build_macos64:
# For commits to the original mac build action see:
# https://github.com/Thlumyn/clangen/blob/29c9e39fed9a09b8de906f5c3b91dc044fe9b9a5/.github/workflows/main.yml
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.11 x64
uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.11"
# - name: Install poetry
# uses: abatilo/actions-poetry@v2
# with:
# poetry-version: 1.4.1
# - name: install dependencies
# run: poetry install --with build -E discord
- name: Update pip
run: python -m pip install --upgrade pip
- name: Update setuptools and wheel
run: python -m pip install --upgrade setuptools wheel
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install Pillow for icon format conversion
run: python -m pip install --upgrade Pillow
- name: Install PyInstaller
run: python -m pip install --upgrade PyInstaller
- name: Run PyInstaller
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py
# run: poetry run python3 -m PyInstaller Clangen.spec
run: python -m PyInstaller Catmaker.spec
- name: Create archive (.tar.xz)
run: rm -r dist/Catmaker
- name: Install appdmg
run: "npm install -g appdmg"
- name: Generate .dmg
run: "appdmg appdmg.json Catmaker_macOS64.dmg"
- uses: actions/upload-artifact@v3
with:
name: Catmaker_macOS64.dmg
path: Catmaker_macOS64.dmg