chore: 修改一些默认值 #77
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: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-07-31 | |
| targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc | |
| components: clippy,rustfmt | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Schema tests | |
| run: cargo test -p applechu-schema --target x86_64-pc-windows-msvc | |
| - name: Check game-side proxy | |
| run: cargo check -p applechu --tests --target i686-pc-windows-msvc | |
| - name: Check AM Daemon proxy | |
| run: cargo check -p applechu-amdaemon --target x86_64-pc-windows-msvc | |
| - name: Clippy game-side proxy | |
| run: cargo clippy -p applechu --all-targets --target i686-pc-windows-msvc -- -D warnings | |
| - name: Clippy AM Daemon proxy | |
| run: cargo clippy -p applechu-amdaemon --target x86_64-pc-windows-msvc -- -D warnings | |
| build: | |
| runs-on: windows-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-07-31 | |
| targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc | |
| - name: Build game-side winhttp.dll | |
| run: cargo build --release -p applechu --target i686-pc-windows-msvc | |
| - name: Build AM Daemon winmm.dll | |
| run: cargo build --release -p applechu-amdaemon --target x86_64-pc-windows-msvc | |
| - name: Verify embedded schema | |
| run: cargo run -p applechu-schema --bin verify_pe --target x86_64-pc-windows-msvc -- target/i686-pc-windows-msvc/release/winhttp.dll target/i686-pc-windows-msvc/release/AppleChu.example.toml | |
| - name: Upload game-side proxy | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: winhttp.dll | |
| path: | | |
| target/i686-pc-windows-msvc/release/winhttp.dll | |
| target/i686-pc-windows-msvc/release/AppleChu.example.toml | |
| - name: Upload AM Daemon proxy | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: winmm.dll | |
| path: target/x86_64-pc-windows-msvc/release/winmm.dll | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: '*.dll' | |
| merge-multiple: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| winhttp.dll | |
| winmm.dll | |
| AppleChu.example.toml |