Updated of the forge from github with image system online

This commit is contained in:
2026-05-08 16:20:49 +08:00
parent d7c19ed782
commit 9f2e3f3f78
152 changed files with 1573 additions and 1201 deletions
+24 -44
View File
@@ -1,67 +1,47 @@
name: Build and Release mxPIC Wheels
name: Build Linux and Release mxPIC
# This tells GitHub to ONLY run this pipeline when you push a version tag (e.g., v1.0.0)
on:
release:
types: [published]
[published]
jobs:
# --- JOB 1: THE COMPILER ---
build-wheels:
name: Build on ${{ matrix.os }}
# The matrix allows us to build for Windows and Linux simultaneously!
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10']
build-and-release:
name: Build Linux & Publish Release
# This targets your Docker runner on the Synology NAS
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Install Build Dependencies
# Install the tools required by our custom build_wheel.py script
run: |
python -m pip install --upgrade pip
pip install build wheel mypy Cython setuptools
- name: Run Auto-Builder (Compiles C-extensions & Injects .pyi)
- name: Run Auto-Builder (Compiles Linux C-extensions & Injects .pyi)
# This generates the linux_x86_64.whl inside the dist/ folder
run: python build_wheel.py
- name: Temporarily Store the Built Wheel
uses: actions/upload-artifact@v4
with:
name: mxpic-wheels-${{ matrix.os }}
path: dist/*.whl
retention-days: 1
- name: Inject Prebuilt Windows Wheel
# This copies your locally-built Windows wheel into the dist/ folder
# so they sit side-by-side right before the release is published.
run: |
if [ -d "prebuilt_wheels" ]; then
cp prebuilt_wheels/*.whl dist/ || true
echo "✅ Windows wheel staged for release."
else
echo "⚠️ No prebuilt_wheels directory found."
fi
# --- JOB 2: THE RELEASER ---
create-release:
name: Publish to GitHub Releases
needs: build-wheels # Waits for both Windows and Linux to finish
runs-on: ubuntu-latest
permissions:
contents: write # Required to allow the bot to create a release page
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download all OS Wheels
uses: actions/download-artifact@v4
with:
pattern: mxpic-wheels-*
path: dist
merge-multiple: true
- name: Upload Assets to Gitea Release
uses: softprops/action-gh-release@v1
- name: Create Gitea Release
uses: https://gitea.com/actions/release-action@main
with:
# This command scopes up everything currently sitting in the dist/ folder
files: "dist/*.whl"
api_key: ${{ secrets.GITEA_TOKEN }}