1.5.3 #56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # 在 push / PR 时跑构建 + 单测 + 集成自检(R4-TEST-001)。 | |
| # 需要把项目纳入 git 并推送到 GitHub Actions 才会触发;本地不运行。 | |
| # | |
| # 注意:本项目用较新的 Swift / macOS SDK 构建(本地 Swift 6.x)。CI 选用最新可用的 | |
| # runner 镜像 + 最新稳定 Xcode,尽量贴近本地 SDK,避免「本地能编、旧 SDK 编不过」。 | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-test: | |
| name: Build · Test · Checks | |
| runs-on: macos-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 选用 runner 上最新稳定的 Xcode(其 SDK 较新,减少 API 可用性差异导致的编译失败)。 | |
| - name: Select latest stable Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Toolchain version | |
| run: swift --version && xcodebuild -version | |
| - name: Build (debug) | |
| run: swift build | |
| - name: Unit tests | |
| run: swift test | |
| - name: Integration self-check (MediaLibChecks) | |
| run: swift run MediaLibChecks |