-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (121 loc) · 4.7 KB
/
manual.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
# Cross-compile workflow that is manually triggered
name: Cross Compile Manual workflow
# 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-latest, ubuntu-latest, windows-latest]
env:
YOUTUBE_DISABLE: yes
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: Ubuntu specific
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg
- name: MacOS specific
if: matrix.os == 'macos-latest'
run: |
brew update
brew install portaudio
brew reinstall libsndfile
- name: Setup Python x64
uses: actions/setup-python@v5
with:
python-version: '3.11' # 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'
run: |
sudo apt-get install libgirepository1.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
- name: Install Dependencies for All
run: |
pip install -r requirements.txt
- name: Build Executable for ${{runner.os}}
uses: Nuitka/Nuitka-Action@v1.1
with:
nuitka-version: 2.2.3
script-name: WLEDVideoSync.py
company-name: zak-45
file-version: ${{github.event.inputs.mytag}}
enable-plugins: tk-inter
disable-console: True
deployment: true
windows-icon-from-ico: assets/favicon.ico
macos-app-icon: assets/favicon.ico
macos-create-app-bundle: true
onefile: true
onefile-tempdir-spec: ./WLEDVideoSync
output-file: WLEDVideoSync-${{runner.os}}
include-package-data: nicegui
include-module: |
CastAPI
zeroconf._utils.ipaddress
zeroconf._handlers.answers
pygments.formatters.html
dbm.dumb
comtypes.stream
include-data-dir: |
tmp=tmp
log=log
assets=assets
config=config
media=media
xtra=xtra
include-data-files: |
favicon.ico=favicon.ico
splash-screen.png=splash-screen.png
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{runner.os}} Build
if-no-files-found: warn
path: 'build/WLEDVideoSync-${{runner.os}}**'
- name: Create Release ${{github.event.inputs.mytag}} with Builds from Nuitka
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: main
tag: ${{github.event.inputs.mytag}}
artifacts: 'build/WLEDVideoSync-${{runner.os}}**'