Files
NTrace-core/.github/workflows/regression.yml
T
tsosunchia 02c5986bfa build(go): 升级至 Go 1.27.3 并统一使用默认 JSON 后端
- 同步模块、CI 和构建工具链版本,按对照提交选择性能测试工具链
- 移除 nojsonv2 发布配置、PGO 专用配置与旧实现测试分支
- 更新 JSON 性能复测证据、发布决策和构建说明
2026-11-01 02:37:23 +08:00

170 lines
4.5 KiB
YAML

name: Runtime Regression CI
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [main]
paths:
- ".cross_compile.sh"
- ".github/ci-paths.json"
- ".github/workflows/regression.yml"
- "assets/windivert/**"
- "cmd/**/*.go"
- "cmd/**/testdata/**"
- "config/**/*.go"
- "config/**/testdata/**"
- "default.pgo"
- "dn42/**/*.go"
- "dn42/**/testdata/**"
- "fast_trace/**/*.go"
- "fast_trace/**/testdata/**"
- "go.mod"
- "go.sum"
- "internal/**/*.go"
- "internal/**/testdata/**"
- "ipgeo/**/*.go"
- "ipgeo/**/testdata/**"
- "main.go"
- "pow/**/*.go"
- "pow/**/testdata/**"
- "printer/**/*.go"
- "printer/**/testdata/**"
- "reporter/**/*.go"
- "reporter/**/testdata/**"
- "scripts/ci/**"
- "scripts/regression/linux.sh"
- "scripts/regression/macos.sh"
- "scripts/regression/unix.sh"
- "scripts/regression/windows.ps1"
- "server/**/*.go"
- "server/**/testdata/**"
- "server/web/**"
- "trace/**/*.go"
- "trace/**/testdata/**"
- "tracelog/**/*.go"
- "tracelog/**/testdata/**"
- "tracemap/**/*.go"
- "tracemap/**/testdata/**"
- "util/**/*.go"
- "util/**/testdata/**"
- "wshandle/**/*.go"
- "wshandle/**/testdata/**"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".cross_compile.sh"
- ".github/ci-paths.json"
- ".github/workflows/regression.yml"
- "assets/windivert/**"
- "cmd/**/*.go"
- "cmd/**/testdata/**"
- "config/**/*.go"
- "config/**/testdata/**"
- "default.pgo"
- "dn42/**/*.go"
- "dn42/**/testdata/**"
- "fast_trace/**/*.go"
- "fast_trace/**/testdata/**"
- "go.mod"
- "go.sum"
- "internal/**/*.go"
- "internal/**/testdata/**"
- "ipgeo/**/*.go"
- "ipgeo/**/testdata/**"
- "main.go"
- "pow/**/*.go"
- "pow/**/testdata/**"
- "printer/**/*.go"
- "printer/**/testdata/**"
- "reporter/**/*.go"
- "reporter/**/testdata/**"
- "scripts/ci/**"
- "scripts/regression/linux.sh"
- "scripts/regression/macos.sh"
- "scripts/regression/unix.sh"
- "scripts/regression/windows.ps1"
- "server/**/*.go"
- "server/**/testdata/**"
- "server/web/**"
- "trace/**/*.go"
- "trace/**/testdata/**"
- "tracelog/**/*.go"
- "tracelog/**/testdata/**"
- "tracemap/**/*.go"
- "tracemap/**/testdata/**"
- "util/**/*.go"
- "util/**/testdata/**"
- "wshandle/**/*.go"
- "wshandle/**/testdata/**"
jobs:
regression:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
GOTOOLCHAIN: go1.27.3
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux
- os: macos-latest
name: macos
- os: windows-latest
name: windows
steps:
- name: Checkout codebase
uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.27.3"
check-latest: true
cache: true
- name: Install Linux runtime deps
if: ${{ matrix.name == 'linux' }}
run: |
sudo apt-get update
sudo apt-get install -y tcpdump
- name: Run regression on Linux
if: ${{ matrix.name == 'linux' }}
env:
ART_ROOT: ${{ github.workspace }}/.regression/linux
NTRACE_SKIP_IPV6: "1"
run: bash scripts/regression/linux.sh
- name: Run regression on macOS
if: ${{ matrix.name == 'macos' }}
env:
ART_ROOT: ${{ github.workspace }}/.regression/macos
NTRACE_SKIP_IPV6: "1"
run: bash scripts/regression/macos.sh
- name: Run regression on Windows
if: ${{ matrix.name == 'windows' }}
shell: pwsh
run: |
.\scripts\regression\windows.ps1 -ArtifactsRoot "${{ github.workspace }}\.regression\windows"
- name: Upload regression artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: regression-${{ matrix.name }}
path: ${{ github.workspace }}/.regression/${{ matrix.name }}
if-no-files-found: warn