This commit is contained in:
2025-10-29 22:20:21 +08:00
commit 32b3b7b29a
111 changed files with 344425 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
name: Nuitka 编译 Linux 可执行文件
on:
workflow_dispatch:
inputs:
build_reason:
description: "触发构建的原因(选填)"
required: false
default: "手动触发 Linux 可执行文件构建"
jobs:
compile-linux-exe:
runs-on: ubuntu-latest
steps:
# 步骤1Gitea 原生拉取代码(解决 GitHub 超时)
- name: Gitea 原生拉取仓库代码
uses: actions/checkout@v4
# 步骤2配置 Linux 编译环境与依赖(移除 mingw-w64 交叉工具)
- name: 配置编译环境与依赖
run: |
sudo apt update && sudo apt install -y python3-venv python3-dev patchelf
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple \
fake_useragent==2.2.0 \
loguru==0.7.3 \
numpy==2.3.3 \
Pillow==11.3.0 \
pycryptodome==3.21.0 \
PyQt6==6.9.2 \
PyQt6-fluent-widgets==1.8.4 \
PySideSix_Frameless_Window==0.4.3 \
Requests==2.32.5 \
rsa==4.9.1 \
nuitka
# 步骤3Nuitka 编译 Linux 可执行文件(删除 --mingw64 交叉参数)
- name: Nuitka 编译 Linux 可执行文件
run: |
source .venv/bin/activate
nuitka --standalone \
--assume-yes-for-downloads \
--nofollow-import-to=numpy,scipy,PIL,colorthief \
--enable-plugins=PyQt6 \
--show-progress \
--output-dir=build \
./main.py
# 步骤4上传 Linux 产物(路径不变,产物为无后缀名的可执行文件)
- name: 上传 Linux 可执行产物
uses: actions/upload-artifact@v3
with:
name: Linux-Executable-Output
path: ./build/* # Linux 产物无后缀,默认与源码主文件同名
retention-days: 7