diff --git a/.gitea/workflows/wheel-pipeline.yaml b/.gitea/workflows/wheel-pipeline.yaml new file mode 100644 index 0000000..fe2f953 --- /dev/null +++ b/.gitea/workflows/wheel-pipeline.yaml @@ -0,0 +1,69 @@ +name: EcoArk Wheel Pipeline CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + + # ────────────────────────────────────────────── + # Job 1: validate — pure wheel repack + native stub + # ────────────────────────────────────────────── + validate: + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Show environment info + run: | + echo "══════════════════════════════════════════" + echo " Runner : $(uname -a)" + echo " Hostname: $(hostname)" + echo " Date : $(date -u +%Y-%m-%dT%H:%M:%SZ)" + echo "══════════════════════════════════════════" + python3 --version + pip3 --version 2>/dev/null || echo "pip3 not available" + which make gcc g++ rustc 2>/dev/null || true + + - name: Generate test wheels + run: | + python3 examples/gen_test_wheels.py + + - name: Show generated test wheels + run: | + ls -lh examples/*.whl + + - name: Validate pure wheel repack + run: | + WHEEL=$(ls examples/*-none-any.whl | head -1) + echo "Pure wheel: $WHEEL" + python3 wheel_pipeline.py "$WHEEL" --output-dir output + echo "" + echo "Output files:" + ls -lh output/*.whl + + - name: Validate native wheel stub + run: | + WHEEL=$(ls examples/*-manylinux*.whl | head -1) + echo "Native wheel: $WHEEL" + python3 wheel_pipeline.py "$WHEEL" --output-dir output --target-os harmonyos --arch arm64 + echo "" + echo "Output files:" + ls -lh output/*.whl + + - name: Show all pipeline outputs + run: | + echo "=== Final output directory ===" + find output/ -type f -name '*.whl' -exec ls -lh {} \; + echo "" + echo "=== All output artifacts ===" + find output/ -type f | sort + + - name: Summary + run: | + echo "All pipeline steps passed successfully." diff --git a/.gitignore b/.gitignore index 0163807..a50bc98 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ __pycache__/ *.egg-info/ dist/ build/ +examples/*.whl +output/*.whl diff --git a/README.md b/README.md index a4509a7..852654a 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,24 @@ python3 wheel_pipeline.py mypackage.whl -o output/ 当前版本仅输出 stub,待后续完善。 +## 通过 Gitea Actions 触发流水线 + +本仓库配置了 Gitea Actions 工作流,commit 推送到 `main` 分支后会自动触发。 + +### 手动触发 + +1. 打开 Gitea 仓库页面 → **Actions** 标签 +2. 在 **EcoArk Wheel Pipeline CI** 工作流右侧点击 **▸ Run workflow** +3. 选择分支为 `main`,点击 **Run workflow** + +### 工作流说明 + +| Job | 作用 | +|-----|------| +| `validate` | 生成测试 wheel,分别验证纯 Python 轮子的重打包和 native 轮子的重编译入口 | + +工作流文件位于 `.gitea/workflows/wheel-pipeline.yaml`,可直接扩展为生产流水线。 + ## 依赖 - Python ≥ 3.8(标准库,无需额外安装包)