init
This commit is contained in:
55
.gitea/workflows/nuitka-build.yml
Normal file
55
.gitea/workflows/nuitka-build.yml
Normal 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:
|
||||
# 步骤1:Gitea 原生拉取代码(解决 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
|
||||
|
||||
# 步骤3:Nuitka 编译 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
|
||||
Reference in New Issue
Block a user