mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-09-08 15:33:57 +05:00
Compare commits
No commits in common. "08c72152d018b1a93df60c8cb8d78c0b76c6da5f" and "8baab91e60fdd86dfa7cc7b5e8b1d20437d0ff5f" have entirely different histories.
08c72152d0
...
8baab91e60
5 changed files with 5 additions and 108 deletions
95
.github/workflows/build.yml
vendored
95
.github/workflows/build.yml
vendored
|
@ -1,95 +0,0 @@
|
||||||
name: "YAMPD Build"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: "build"
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_linux:
|
|
||||||
name: "linux-build"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "[Preparing] cloning repository"
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: "[DEPS/Tool] bun"
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
- name: "[DEPS/Tool] python"
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.13.2'
|
|
||||||
cache: 'pip'
|
|
||||||
- name: "[DEBUG] check if pip is installed"
|
|
||||||
run: |
|
|
||||||
which pip
|
|
||||||
pip --version
|
|
||||||
- name: "[DEPS/Build] Backend"
|
|
||||||
run: |
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install -r requirements.build.txt
|
|
||||||
- name: "[DEPS/Build] Frontend"
|
|
||||||
run: bun install
|
|
||||||
working-directory: ./gui
|
|
||||||
- name: "[Build] Building artifact"
|
|
||||||
run: python ./build.py --exe
|
|
||||||
- name: "[Publish] Upload GUI Artifact"
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: "YAMPD-gui-linux"
|
|
||||||
path: "./dist/yamcpack"
|
|
||||||
if-no-files-found: warn
|
|
||||||
retention-days: 14
|
|
||||||
- name: "[Publish] Upload CLI Artifact"
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: "YAMPD-cli-linux"
|
|
||||||
path: "./dist/yamcpack-cli"
|
|
||||||
if-no-files-found: warn
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
build_windows:
|
|
||||||
name: "windows-build"
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: "[Preparing] cloning repository"
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: "[DEPS/Tool] bun"
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
- name: "[DEPS/Tool] python"
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.13.2'
|
|
||||||
cache: 'pip'
|
|
||||||
- name: "[DEPS/Build] Backend"
|
|
||||||
run: |
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install -r requirements.build.txt
|
|
||||||
- name: "[DEPS/Build] Frontend"
|
|
||||||
run: "bun install"
|
|
||||||
working-directory: ./gui
|
|
||||||
- name: "[Build] Building artifact"
|
|
||||||
run: python ./build.py --exe
|
|
||||||
- name: "[Publish] Upload GUI Artifact"
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: "YAMPD-gui-windows.exe"
|
|
||||||
path: "./dist/yamcpack.exe"
|
|
||||||
if-no-files-found: warn
|
|
||||||
retention-days: 14
|
|
||||||
- name: "[Publish] Upload CLI Artifact"
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: "YAMPD-cli-windows.exe"
|
|
||||||
path: "./dist/yamcpack-cli.exe"
|
|
||||||
if-no-files-found: warn
|
|
||||||
retention-days: 14
|
|
8
build.py
8
build.py
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -58,7 +56,7 @@ if __name__ == "__main__":
|
||||||
# TODO?: install node deps automatically
|
# TODO?: install node deps automatically
|
||||||
|
|
||||||
if not args.no_rebuild:
|
if not args.no_rebuild:
|
||||||
build = subprocess.call(["bun", "run", "build"], cwd="./gui", shell=(os.name == "nt"))
|
build = subprocess.call(["bun", "run", "build"], cwd="./gui", shell=True)
|
||||||
if build != 0:
|
if build != 0:
|
||||||
print("[ERROR] Next.js gui has failed to build")
|
print("[ERROR] Next.js gui has failed to build")
|
||||||
raise
|
raise
|
||||||
|
@ -112,7 +110,7 @@ if __name__ == "__main__":
|
||||||
"templates:templates",
|
"templates:templates",
|
||||||
],
|
],
|
||||||
cwd="./dist",
|
cwd="./dist",
|
||||||
shell=(os.name == "nt"),
|
shell=True,
|
||||||
)
|
)
|
||||||
if build != 0:
|
if build != 0:
|
||||||
print("[ERROR] pyinstaller has failed to build an app")
|
print("[ERROR] pyinstaller has failed to build an app")
|
||||||
|
@ -142,7 +140,7 @@ if __name__ == "__main__":
|
||||||
"mc_version.json:.",
|
"mc_version.json:.",
|
||||||
],
|
],
|
||||||
cwd="./dist",
|
cwd="./dist",
|
||||||
shell=(os.name == "nt"),
|
shell=True,
|
||||||
)
|
)
|
||||||
if build != 0:
|
if build != 0:
|
||||||
print("[ERROR] pyinstaller has failed to build an app")
|
print("[ERROR] pyinstaller has failed to build an app")
|
||||||
|
|
6
dev.py
6
dev.py
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
@ -15,10 +13,10 @@ if __name__ == "__main__":
|
||||||
# TODO?: install node deps automatically
|
# TODO?: install node deps automatically
|
||||||
|
|
||||||
gui_proc = subprocess.Popen(
|
gui_proc = subprocess.Popen(
|
||||||
["bun", "run", "dev"], cwd="./gui", env=environment, shell=(os.name == "nt")
|
["bun", "run", "dev"], cwd="./gui", env=environment, shell=True
|
||||||
)
|
)
|
||||||
app_proc = subprocess.Popen(
|
app_proc = subprocess.Popen(
|
||||||
["python", "main.py"], cwd="./src", env=environment, shell=(os.name == "nt")
|
["python", "main.py"], cwd="./src", env=environment, shell=True
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from sys import exit
|
from sys import exit
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask import render_template, send_file, abort
|
from flask import render_template, send_file, abort
|
||||||
from flaskwebgui import FlaskUI # import FlaskUI
|
from flaskwebgui import FlaskUI # import FlaskUI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue