ci: add Gitea Actions workflow for wheel pipeline validation
Some checks failed
EcoArk Wheel Pipeline CI / validate (push) Failing after 8m59s
Some checks failed
EcoArk Wheel Pipeline CI / validate (push) Failing after 8m59s
- .gitea/workflows/wheel-pipeline.yaml: checkout → env info → gen test wheels → pure repack test → native stub test → summary - runs-on: ubuntu-latest (matches registered runner label) - .gitignore: exclude generated test wheels - README: add '通过 Gitea Actions 触发流水线' section
This commit is contained in:
69
.gitea/workflows/wheel-pipeline.yaml
Normal file
69
.gitea/workflows/wheel-pipeline.yaml
Normal file
@ -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."
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ __pycache__/
|
||||
*.egg-info/
|
||||
dist/
|
||||
build/
|
||||
examples/*.whl
|
||||
output/*.whl
|
||||
|
||||
18
README.md
18
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(标准库,无需额外安装包)
|
||||
|
||||
Reference in New Issue
Block a user