CI (Windows) #48
Workflow file for this run
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 (Windows) | |
| # Windows ビルドの継続的な健全性チェック。 | |
| # | |
| # 背景 (方針): | |
| # Windows 移植は main に同居させる。共有コードは Bubilator88Core (Swift) だけで、 | |
| # Windows 固有の変更は Sources/CApi/ の追加と数箇所の #if os(Windows) に | |
| # 閉じている。したがって macOS 側の作業が Windows を壊しうるのは | |
| # Bubilator88Core を触ったときだけ — そのときだけこのジョブを回す。 | |
| # | |
| # コアは別リポジトリ (bubio/Bubilator88Core)。このリポジトリでコアが変わるのは | |
| # Package.resolved の revision を上げたときなので、それをトリガーにする。 | |
| # checkout するコアも同じ revision (.github/actions/checkout-core)。 | |
| # | |
| # このジョブが赤くても macOS の開発は止めない。Windows シェルは遅れてよい、 | |
| # というのが明示的な方針 (AGENTS.md「Windows Native Port」節)。 | |
| # 赤は「Windows が壊れたことが記録された」という意味であり、 | |
| # 気が向いたときに直せばよい。 | |
| # | |
| # リリース系統 (release-windows.yml, タグ win-v*) とは別物。 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'Bubilator88.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved' | |
| - '.github/actions/checkout-core/**' | |
| - 'windows/**' | |
| - 'models/onnx/**' | |
| - 'scripts/build-windows-package.ps1' | |
| - 'scripts/check-capi-exports.sh' | |
| - '.github/workflows/ci-windows.yml' | |
| pull_request: | |
| paths: | |
| - 'Bubilator88.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved' | |
| - '.github/actions/checkout-core/**' | |
| - 'windows/**' | |
| - 'models/onnx/**' | |
| - 'scripts/build-windows-package.ps1' | |
| - 'scripts/check-capi-exports.sh' | |
| - '.github/workflows/ci-windows.yml' | |
| workflow_dispatch: | |
| # 同一ブランチへの連続 push では最新のみ検証する。 | |
| concurrency: | |
| group: ci-windows-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| SWIFT_VERSION: "6.3.2" | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| timeout-minutes: 60 | |
| steps: | |
| # AI モデル (Git LFS) は取得しない。ビルド検証には不要で、 | |
| # csproj のコピーはポインタファイルでも成立するため -SkipModelCheck で回す。 | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/checkout-core | |
| - name: Setup Swift ${{ env.SWIFT_VERSION }} | |
| uses: SwiftyLab/setup-swift@v1 | |
| with: | |
| swift-version: ${{ env.SWIFT_VERSION }} | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Show environment | |
| shell: pwsh | |
| run: | | |
| swift --version | |
| dotnet --version | |
| # @_cdecl を足して .def に書き忘れると DLL からシンボルが消えるが | |
| # ビルドは通ってしまう。実行時 P/Invoke 失敗になる前に機械的に弾く。 | |
| - name: Check CApi exports (.def sync) | |
| shell: bash | |
| run: ./scripts/check-capi-exports.sh | |
| # Bubilator88Core のユニットテストを Windows 上でも回す。 | |
| # ビルドが通っても壊れうる差分 (セーブステート形式、時刻/ロケール依存、 | |
| # エンディアン以外の Foundation 差異) はここでしか捕まらない。 | |
| - name: Build & test (Windows) | |
| shell: pwsh | |
| run: | | |
| ./scripts/build-windows-package.ps1 ` | |
| -Version "0.0.0-ci" ` | |
| -RunCoreTests ` | |
| -SkipModelCheck | |
| - name: Check Windows shell tests | |
| shell: pwsh | |
| run: dotnet test windows/Bubilator88.Windows.Tests/Bubilator88.Windows.Tests.csproj -c Release |