移除无用Drawing文件夹,更新Color等核心类 #68
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 Demo Assets | |
| 'on': | |
| push: | |
| branches: [main, develop, master] | |
| tags: | |
| - "v*" | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'README.md' | |
| - 'README_en.md' | |
| - 'ROADMAP.md' | |
| - 'CHANGELOG.md' | |
| - '.github/workflows/docs-pages.yml' | |
| pull_request: | |
| branches: [main, develop, master] | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'README.md' | |
| - 'README_en.md' | |
| - 'ROADMAP.md' | |
| - 'CHANGELOG.md' | |
| - '.github/workflows/docs-pages.yml' | |
| workflow_dispatch: | |
| inputs: | |
| package_version: | |
| description: Optional package version used in demo asset filenames | |
| required: false | |
| default: "" | |
| workflow_call: | |
| inputs: | |
| package_version: | |
| description: Optional package version used in demo asset filenames | |
| required: false | |
| type: string | |
| env: | |
| DEMO_PACKAGE_VERSION: ${{ inputs.package_version || github.ref_name || 'dev' }} | |
| jobs: | |
| build-linux-demos: | |
| name: Build demo asset (linux-x64) | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install Linux build dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y cmake ninja-build | |
| - name: Build and publish Linux demos | |
| run: bash ./build-linux-demos.sh --clean --rid linux-x64 | |
| - name: Archive Linux demos | |
| shell: bash | |
| run: | | |
| mkdir -p release_assets | |
| tar -C dist -czf "release_assets/LVGLSharp-demos-linux-x64-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz" linux-x64 | |
| ls -lh release_assets | |
| - name: Upload Linux demo artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: demo-release-linux-x64 | |
| path: release_assets/LVGLSharp-demos-linux-x64-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz | |
| if-no-files-found: error | |
| build-windows-demos: | |
| name: Build demo asset (win-x64) | |
| runs-on: windows-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build and publish Windows demos | |
| shell: pwsh | |
| run: ./build-windows-demos.ps1 -Clean -Rid win-x64 | |
| - name: Archive Windows demos | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path release_assets -Force | Out-Null | |
| $archivePath = Join-Path $PWD "release_assets/LVGLSharp-demos-win-x64-${{ env.DEMO_PACKAGE_VERSION }}.zip" | |
| if (Test-Path $archivePath) { | |
| Remove-Item -Force $archivePath | |
| } | |
| Compress-Archive -Path "dist/win-x64" -DestinationPath $archivePath -CompressionLevel Optimal | |
| Get-ChildItem release_assets | Format-Table Name, Length -AutoSize | |
| - name: Upload Windows demo artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: demo-release-win-x64 | |
| path: release_assets/LVGLSharp-demos-win-x64-${{ env.DEMO_PACKAGE_VERSION }}.zip | |
| if-no-files-found: error | |
| build-macos-demo-skeleton: | |
| name: Build macOS AOT demo (${{ matrix.rid }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - rid: osx-arm64 | |
| os: macos-15 | |
| - rid: osx-x64 | |
| os: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install macOS build dependencies | |
| run: brew install cmake ninja | |
| - name: Build macOS demo | |
| shell: bash | |
| run: bash ./build-macos-demo.sh --clean --rid ${{ matrix.rid }} | |
| - name: Archive macOS demo | |
| shell: bash | |
| run: | | |
| mkdir -p release_assets | |
| tar -C "dist/${{ matrix.rid }}" -czf "release_assets/LVGLSharp-demos-${{ matrix.rid }}-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz" MacOsAotDemo | |
| ls -lh release_assets | |
| - name: Upload macOS demo artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: demo-release-${{ matrix.rid }} | |
| path: release_assets/LVGLSharp-demos-${{ matrix.rid }}-${{ env.DEMO_PACKAGE_VERSION }}.tar.gz | |
| if-no-files-found: error |