-
Notifications
You must be signed in to change notification settings - Fork 1
236 lines (206 loc) · 8.75 KB
/
Copy pathmanual2.yml
File metadata and controls
236 lines (206 loc) · 8.75 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# Cross-compile workflow that is manually triggered
name: Cross Compile Manual workflow v2
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
mytag:
# Friendly description to be shown in the UI instead of 'name'
description: 'Input Tag'
# Default value if no value is explicitly provided
default: '0.0.0.0'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
permissions:
contents: write
strategy:
matrix:
# os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest]
os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest]
env:
YOUTUBE_DISABLE: no
DEBUG_COMPILATION: yes
COMP_VERSION: ${{github.event.inputs.mytag}}
runs-on: ${{matrix.os}}
steps:
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDD-HH
utcOffset: "+02:00"
- name: Check-out repository
uses: actions/checkout@v4
- name: Windows specific
if: matrix.os == 'windows-latest'
run: |
echo "ARCHITECTURE=x86_64" >> $env:GITHUB_ENV
curl -L -o xtra/info_window.exe https://github.com/zak-45/InfoWindow/releases/download/0.0.0.0/info_window-Windows_.exe
- name: Ubuntu specific
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install libfontconfig1 libgl1-mesa-dri
ARCHITECTURE=$(uname -m)
echo "ARCHITECTURE=$ARCHITECTURE" >> $GITHUB_ENV
curl -L -o xtra/info_window https://github.com/zak-45/InfoWindow/releases/download/0.0.0.0/info_window-Linux_x86_64
chmod +x xtra/info_window
- name: MacOS specific Apple(Mx)
if: matrix.os == 'macos-latest'
# brew unlink python@3.12 && brew link --overwrite python@3.12
# brew unlink python@3.13 && brew link --overwrite python@3.13
# brew cleanup
run: |
brew update
brew upgrade
brew install portaudio
brew reinstall libsndfile
brew install ffmpeg
brew install fileicon
ARCHITECTURE=$(uname -m)
echo "ARCHITECTURE=$ARCHITECTURE" >> $GITHUB_ENV
curl -L -o xtra/info_window https://github.com/zak-45/InfoWindow/releases/download/0.0.0.0/info_window-macOS_arm64
chmod +x xtra/info_window
xattr -c xtra/info_window
- name: MacOS specific Intel
if: matrix.os == 'macos-15-intel'
# brew unlink python@3.12 && brew link --overwrite python@3.12
# brew update
# brew upgrade
run: |
brew unlink python@3.13 && brew link --overwrite python@3.13
brew cleanup
brew install portaudio
brew reinstall libsndfile
brew install ffmpeg
brew install fileicon
ARCHITECTURE=$(uname -m)
echo "ARCHITECTURE=$ARCHITECTURE" >> $GITHUB_ENV
curl -L -o xtra/info_window https://github.com/zak-45/InfoWindow/releases/download/0.0.0.0/info_window-macOS_x86_64
chmod +x xtra/info_window
xattr -c xtra/info_window
- name: Setup Python x64
uses: actions/setup-python@v5
with:
python-version: '3.12' # Version range or exact version of a Python version to use
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Add version info to json file
env:
GitRun: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
run: |
echo '{"version": "${{env.COMP_VERSION}}","gitrun": "${{env.GitRun}}","date": "${{ steps.current-time.outputs.time }}","name": "${{ steps.system-info.outputs.name }}","platform": "${{ steps.system-info.outputs.platform }}","release": "${{ steps.system-info.outputs.release }}","python":"${{env.Python_ROOT_DIR}}","youtube_disable":"${{env.YOUTUBE_DISABLE}}","debug_compilation":"${{env.DEBUG_COMPILATION}}"}' > ./assets/version-${{ steps.system-info.outputs.platform }}.json
- name: Ubuntu specific bis
if: matrix.os == 'ubuntu-latest'
#
# pip3 install av==15.1.0 --no-binary av
run: |
sudo apt update
sudo apt upgrade
sudo apt-get -y install libavdevice-dev
sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg7
sudo apt install ffmpeg
ffmpeg -version
sudo apt-get install libgirepository-2.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 gir1.2-webkit2-4.1
sudo apt-get install gstreamer1.0-plugins-bad
sudo apt install gir1.2-appindicator3-0.1 gir1.2-girepository-2.0
- name: Install Dependencies for All
run: |
pip install -r requirements.txt
- name: Build Executable for ${{runner.os}}
uses: Nuitka/Nuitka-Action@main
with:
# nuitka-version: 2.6.2 or main
nuitka-version: 2.8.10
script-name: WLEDVideoSync.py
mode: app
deployment: true
onefile-tempdir-spec: ./WLEDVideoSync
output-file: WLEDVideoSync-${{runner.os}}_${{ env.ARCHITECTURE }}
company-name: zak-45
copyright: zak-45
trademarks: zak-45
product-name: WLEDVideoSync
product-version: ${{github.event.inputs.mytag}}
file-version: ${{github.event.inputs.mytag}}
macos-app-version: ${{github.event.inputs.mytag}}
enable-plugins: tk-inter
windows-icon-from-ico: assets/favicon.ico
macos-app-icon: assets/favicon.ico
linux-icon: assets/favicon.ico
include-package: certifi
include-package-data: |
nicegui
coldtype
certifi
include-module: |
pygments.formatters.html
pygments.lexers.special
pygments.lexers.data
dbm.dumb
av.opaque
zeroconf._utils.ipaddress
zeroconf._handlers.answers
src.txt.textanimator
src.txt.coldtypemp
coldtype.raster
fontgoggles.font.otfFont
moviepy
PIL.Image
PIL.ImageDraw
PIL.ImageFont
PIL.ImageFilter
webbrowser
schedule
xtra.tracetool.tracetool
include-data-dir: |
tmp=tmp
log=log
assets=assets
config=config
media=media
include-data-files: |
favicon.ico=favicon.ico
favicon.png=favicon.png
favicon.icns=favicon.icns
user-package-configuration-file: |
yt_dlp-fix-nuitka-package.config.yml
coldtype-nuitka-package.config.yml
# Use tar to preserve attribute
- name: MacOS prepare app from Nuitka
if: matrix.os == 'macos-15-intel' || matrix.os == 'macos-latest'
run: |
chmod +x build/WLEDVideoSync.app/Contents/MacOS/WLEDVideoSync-${{ runner.os }}_${{ env.ARCHITECTURE }}**
mkdir WLEDVideoSync
fileicon set WLEDVideoSync build/WLEDVideoSync.app/Contents/MacOS/assets/custom_folder.png
mv build/WLEDVideoSync.app WLEDVideoSync/WLEDVideoSync-${{ runner.os }}_${{ env.ARCHITECTURE }}.app
tar cp WLEDVideoSync | gzip --best > WLEDVideoSync-${{runner.os}}_${{ env.ARCHITECTURE }}.tar.gz
- name: Create Release ${{github.event.inputs.mytag}} with Builds from Nuitka for Win/Linux
if: matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: main
tag: ${{github.event.inputs.mytag}}
artifacts: 'build/WLEDVideoSync-${{runner.os}}_${{ env.ARCHITECTURE }}**'
- name: Create Release ${{github.event.inputs.mytag}} with Builds from Nuitka for MacOS
if: matrix.os == 'macos-15-intel' || matrix.os == 'macos-latest'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: main
tag: ${{github.event.inputs.mytag}}
artifacts: 'WLEDVideoSync-${{runner.os}}_${{ env.ARCHITECTURE }}.tar.gz'