Repository navigation
feat: Sanitizer 构建模式、发射方位角模块与脚本执行器增强 - #105
Conversation
…avoid NaN results
…ized support checks and improved error handling
…for improved accuracy
…ary loading and error handling
|
Important Review skippedToo many files! This PR contains 563 files, which is 413 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to Team to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (563)
You can disable this status message by setting the Comment |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 high |
🟢 Metrics 1303 complexity · 0 duplication
Metric Results Complexity 1303 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
| runs-on: ${{ matrix.target.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| mode: [release, debug, asan] | ||
| target: | ||
| - { runner: ubuntu-latest, arch: x86_64 } | ||
| - { runner: ubuntu-22.04-arm, arch: arm64 } | ||
| - { runner: windows-2022, arch: x64 } | ||
| - { runner: windows-2022, arch: x86 } | ||
| - { runner: windows-11-arm, arch: arm64 } | ||
| concurrency: | ||
| group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target.runner }}-${{ matrix.target.arch }}-${{ matrix.mode }}-test | ||
| cancel-in-progress: true | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - uses: xmake-io/github-action-setup-xmake@v1 | ||
| with: | ||
| # this is not supported, use dev branch instead | ||
| # xmake-version: local# | ||
| xmake-version: branch@dev | ||
| actions-cache-folder: '.xmake-cache' | ||
| actions-cache-key: ${{ matrix.target.runner }} | ||
|
|
||
| - name: 配置依赖缓存 | ||
| uses: actions/cache@v4 | ||
| with: | ||
| # 包里有一些二进制工具,没必要每个 mode 都缓存一份,避免占用过多缓存额度 | ||
| path: xmake-cache | ||
| key: test-${{ matrix.target.runner }}-${{ matrix.target.arch }}-xmake-cache-${{ hashFiles('repo/packages/**', 'thirdparty/**') }}-v1 | ||
|
|
||
| - name: 配置编译缓存 | ||
| if: github.ref != 'refs/heads/master' | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| build | ||
| .xmake | ||
| key: test-${{ matrix.target.runner }}-${{ matrix.target.arch }}-${{ matrix.mode }}-build-v1-${{ hashFiles('repo/packages/**', 'thirdparty/**') }}-${{ github.sha }} | ||
| restore-keys: | | ||
| test-${{ matrix.target.runner }}-${{ matrix.target.arch }}-${{ matrix.mode }}-build-v1-${{ hashFiles('repo/packages/**', 'thirdparty/**') }}- | ||
|
|
||
| - name: 设置xmake相关目录 | ||
| run: | | ||
| xmake g --pkg_cachedir=$(pwd)/xmake-cache/cache | ||
| xmake g --pkg_installdir=$(pwd)/xmake-cache/packages | ||
| xmake repo -u | ||
|
|
||
| - name: 配置项目 | ||
| run: | | ||
| xmake f -cy --with_test=y --check_warnings=n -m ${{ matrix.mode }} -a ${{ matrix.target.arch }} | ||
| xmake show | ||
|
|
||
| - name: 准备 SWIG | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| SWIG_BIN="$(find "$PWD/xmake-cache/packages/s/swig" -type f -name swig 2>/dev/null | head -1)" | ||
| if [ -n "$SWIG_BIN" ]; then echo "$(dirname "$SWIG_BIN")" >> "$GITHUB_PATH"; fi | ||
| echo "swig: ${SWIG_BIN:-未找到}" | ||
|
|
||
| - name: 恢复归档测试用例 | ||
| shell: bash | ||
| run: cp -r test/Archive/* test | ||
|
|
||
| - name: 编译 | ||
| env: | ||
| # 编译期间跑的都是构建工具(swig / moc / 编译器),不是被测代码。 | ||
| # 避免因为存在 ASan 版的工具,让 LeakSanitizer 的泄漏报告把它判成失败。 | ||
| # 测试步骤不带这个变量,泄漏检测照常生效。 | ||
| ASAN_OPTIONS: detect_leaks=0 | ||
| run: | | ||
| xmake -ay | ||
|
|
||
| - name: 执行${{ matrix.mode }}测试 | ||
| timeout-minutes: 90 | ||
| run: | | ||
| xmake cpdata | ||
| xmake test --output-on-failure |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
概述
本 PR 汇总 dev 分支相对 master 的 33 个提交,主要围绕 Sanitizer 构建模式与 CI 测试矩阵、发射方位角计算模块、脚本执行器增强,以及构建系统与测试稳定性的多项修复。
Sanitizer 与内存问题修复
发射方位角
Launch.hpp/Launch.cpp),提供发射方位角与目标轨道倾角的相互换算testLaunchAzimuth单元测试脚本执行器
模块与文档
src/AstUtil/Platform/Thread)构建与基础设施
build.yml支持 arm64,并按 runner 缓存 xmake 构建test.yml测试工作流,增强覆盖率工作流version-check.yml,校验xmake.lua与xmake.sh版本号一致测试稳定性
EXPECT_NEAR容差,提高跨平台一致性变更文件
完整差异见 compare 视图