Files
EntitleForge-SDK-go/.gitea/workflows/ci.yml
T
iceking2nd eebb4998d6
sdk-ci / test (push) Failing after 48s
fix(ci): 删除顶层 CGO_ENABLED=0(Linux 上 -race 强制要求 cgo)
CGO free 红线由交叉编译步骤的局部 CGO_ENABLED=0 保证;测试二进制开
cgo 运行 race 检测不属交付物。
2026-11-09 18:21:29 +08:00

34 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 益铸 EntitleForge SDK CI(Gitea Actions;零第三方依赖库,流水线同样零 action 依赖)
name: sdk-ci
on:
push:
branches: ["*"]
tags: ["v*"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.27"
mirror: https://mirrors.aliyun.com/golang/
- name: 全量测试(race + shuffle)
run: go test -race -shuffle=on ./...
- name: 依赖闭包断言(零第三方依赖红线)
run: |
DEPS=$(go list -deps ./... | grep -vE "^(internal|vendor)/" | grep "\." | \
grep -v "^git.wxccs.org/EntitleForge/EntitleForge-SDK-go" || true)
if [ -n "$DEPS" ]; then
echo "SDK 引入了第三方依赖(违反零依赖红线):"; echo "$DEPS"; exit 1
fi
echo "依赖闭包:纯标准库 ✓"
- name: 交叉编译冒烟(CGO free)
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./...
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build ./...