gha: upgrade .net version #66
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 afs.cmd | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths: | |
| - 'AssFontSubset.Core/**.cs' | |
| - 'AssFontSubset.Core/**.csproj' | |
| - 'AssFontSubset.Console/**.cs' | |
| - 'AssFontSubset.Console/**.csproj' | |
| pull_request: | |
| branches: [ "master" ] | |
| paths: | |
| - 'AssFontSubset.Core/**.cs' | |
| - 'AssFontSubset.Core/**.csproj' | |
| - 'AssFontSubset.Console/**.cs' | |
| - 'AssFontSubset.Console/**.csproj' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: build-${{ matrix.config.target }}-${{ matrix.arch }} | |
| runs-on: ${{ matrix.config.os }} | |
| env: | |
| identifier: ${{ matrix.config.target }}-${{ matrix.arch }} | |
| strategy: | |
| matrix: | |
| harfbuzz_ver: ['11.4.5'] | |
| dotnet_version: ['10.x'] | |
| config: | |
| - os: windows-latest | |
| target: win | |
| framework: net10.0 | |
| - os: windows-latest | |
| target: linux-musl | |
| framework: net10.0 # need zig fix? https://github.com/ziglang/zig/pull/20081 | |
| - os: macos-latest | |
| target: osx | |
| framework: net10.0 | |
| arch: [x64, arm64] | |
| steps: | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet_version }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Test | |
| if: matrix.config.target != 'osx' | |
| run: | | |
| dotnet --version | |
| cd ./AssFontSubset.CoreTests | |
| dotnet restore | |
| dotnet test | |
| cd .. | |
| - name: Setup Zig Compiler (target linux) | |
| if: matrix.config.target == 'linux-musl' | |
| uses: mlugg/setup-zig@v2.2.1 | |
| with: | |
| version: "master" | |
| - name: Add llvm-objcopy (target linux) | |
| if: matrix.config.target == 'linux-musl' | |
| run: | | |
| Invoke-WebRequest -Uri https://github.com/MIRIMIRIM/build-harfbuzz/releases/download/utils/llvm-objcopy.exe -OutFile ./AssFontSubset.Console/llvm-objcopy.exe | |
| - name: Change to afs.cmd and Publish | |
| run: | | |
| cd ./AssFontSubset.Console | |
| dotnet restore | |
| dotnet publish -c Release -r ${{ env.identifier }} -f ${{ matrix.config.framework }} | |
| - name: Set short version | |
| shell: bash | |
| run: | | |
| ver_short=`git rev-parse --short HEAD` | |
| echo "VERSION=$ver_short" >> $GITHUB_ENV | |
| - name: Upload exe files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AssFontSubset.Console_g${{ env.VERSION }}_${{ env.identifier }} | |
| path: | | |
| AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/ | |
| !AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.a | |
| !AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.pdb | |
| !AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dbg | |
| !AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dwarf | |
| !AssFontSubset.Console/bin/Release/${{ matrix.config.framework }}/${{ env.identifier }}/publish/*.dSYM |