Port relevant commits from 2.9.0 and 2.9.1 releases #2576
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, vnext ] | |
| pull_request: | |
| branches: [ main, vnext ] | |
| jobs: | |
| # ================================ | |
| # Windows | |
| # ================================ | |
| windows: | |
| name: Windows | |
| runs-on: ${{ matrix.runtime == 'win-arm64' && 'windows-11-arm' || 'windows-2025' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runtime: [ win-x86, win-x64, win-arm64 ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.2.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| # The x86 test host requires an x86 .NET runtime, which isn't pre-installed | |
| # on the runner, nor can the actions/setup-dotnet action install it. | |
| # Install it manually so tests can run. | |
| - name: Setup .NET (x86) | |
| if: matrix.runtime == 'win-x86' | |
| run: | | |
| Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1 | |
| ./dotnet-install.ps1 -Channel 10.0 -Architecture x86 -InstallDir 'C:\Program Files (x86)\dotnet' | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: | | |
| dotnet build build/windows ` | |
| --verbosity normal ` | |
| --configuration=release ` | |
| --runtime=${{ matrix.runtime }} | |
| - name: Test | |
| run: | | |
| dotnet test --configuration=release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.runtime }} | |
| path: | | |
| out/package/release/*.exe | |
| out/package/release/*.zip | |
| # ================================ | |
| # Linux | |
| # ================================ | |
| linux: | |
| name: Linux | |
| runs-on: ${{ matrix.runtime == 'linux-x64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runtime: [ linux-x64, linux-arm64, linux-arm ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.2.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install cross-compilation toolchain (arm) | |
| if: matrix.runtime == 'linux-arm' | |
| run: | | |
| sudo apt-get update | |
| # Brings in cross-compilation toolchain for armhf including binutils | |
| sudo apt-get install -y gcc-arm-linux-gnueabihf | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: | | |
| dotnet build build/linux \ | |
| --verbosity normal \ | |
| --configuration=release \ | |
| --runtime=${{ matrix.runtime }} | |
| - name: Test | |
| run: | | |
| dotnet test --configuration=release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.runtime }} | |
| path: | | |
| out/package/release/*.deb | |
| out/package/release/*.tar.gz | |
| # ================================ | |
| # macOS | |
| # ================================ | |
| osx: | |
| name: macOS | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runtime: [ osx-x64, osx-arm64 ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.2.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: | | |
| dotnet build build/macos \ | |
| --verbosity normal \ | |
| --configuration=release \ | |
| --runtime=${{ matrix.runtime }} | |
| - name: Test | |
| run: | | |
| dotnet test --configuration=release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.runtime }} | |
| path: | | |
| out/package/release/*.pkg | |
| out/package/release/*.tar.gz | |
| # ================================ | |
| # .NET tool | |
| # ================================ | |
| dntool: | |
| name: .NET Tool | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.2.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Build .NET tool package | |
| run: dotnet build build/dntool --configuration=release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dotnet-tool | |
| path: | | |
| out/package/release/*.nupkg |