π Bump version to 3.0.56 #1718
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: .NET Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| pull_request: | |
| branches: [ "**" ] | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| jobs: | |
| patcher-tests: | |
| name: Run Cosmos.Tests.Patcher | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| steps: | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: π οΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: π Restore Dependencies | |
| run: dotnet restore ./tests/Cosmos.Tests.Patcher/Cosmos.Tests.Patcher.csproj | |
| - name: π¨ Build Cosmos.Patcher | |
| run: dotnet build ./src/Cosmos.Patcher/Cosmos.Patcher.csproj | |
| - name: π¨ Build Cosmos.Build.Patcher | |
| run: dotnet build ./src/Cosmos.Build.Patcher/Cosmos.Build.Patcher.csproj | |
| - name: π¨ Build Cosmos.Tests.Patcher | |
| run: dotnet build ./tests/Cosmos.Tests.Patcher/Cosmos.Tests.Patcher.csproj --configuration Debug --no-restore | |
| - name: π Run Tests | |
| run: dotnet test ./tests/Cosmos.Tests.Patcher/Cosmos.Tests.Patcher.csproj --no-build --configuration Debug --logger "trx;LogFileName=Cosmos.Tests.Patcher.trx" | |
| - name: π€ Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cosmos.Tests.Patcher-Results | |
| path: ./tests/Cosmos.Tests.Patcher/TestResults/Cosmos.Tests.Patcher.trx | |
| scanner-tests: | |
| name: Run Cosmos.Tests.Scanner | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| steps: | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: π οΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: π Restore Dependencies | |
| run: dotnet restore ./tests/Cosmos.Tests.Scanner/Cosmos.Tests.Scanner.csproj | |
| - name: π¨ Build Cosmos.Patcher | |
| run: dotnet build ./src/Cosmos.Patcher/Cosmos.Patcher.csproj | |
| - name: π¨ Build Cosmos.Build.Patcher | |
| run: dotnet build ./src/Cosmos.Build.Patcher/Cosmos.Build.Patcher.csproj | |
| - name: π¨ Build Cosmos.Tests.Scanner | |
| run: dotnet build ./tests/Cosmos.Tests.Scanner/Cosmos.Tests.Scanner.csproj --configuration Debug --no-restore | |
| - name: π Run Tests | |
| run: dotnet test ./tests/Cosmos.Tests.Scanner/Cosmos.Tests.Scanner.csproj --no-build --configuration Debug --logger "trx;LogFileName=Cosmos.Tests.Scanner.trx" | |
| - name: π€ Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cosmos.Tests.Scanner-Results | |
| path: ./tests/Cosmos.Tests.Scanner/TestResults/Cosmos.Tests.Scanner.trx | |
| analyzer-tests: | |
| name: Run Cosmos.Tests.Build.Analyzer.Patcher | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| steps: | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: π οΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: π Restore Dependencies | |
| run: dotnet restore ./tests/Cosmos.Tests.Build.Analyzer.Patcher/Cosmos.Tests.Build.Analyzer.Patcher.csproj | |
| - name: π¨ Build Cosmos.Patcher.Analyzer.Tests | |
| run: dotnet build ./tests/Cosmos.Tests.Build.Analyzer.Patcher/Cosmos.Tests.Build.Analyzer.Patcher.csproj --configuration Debug --no-restore | |
| - name: π Run Tests | |
| run: dotnet test ./tests/Cosmos.Tests.Build.Analyzer.Patcher/Cosmos.Tests.Build.Analyzer.Patcher.csproj --no-build --configuration Debug --logger "trx;LogFileName=Cosmos.Tests.Build.Analyzer.Patcher.trx" | |
| - name: π€ Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cosmos.Tests.Build.Analyzer.Patcher-Results | |
| path: ./tests/Cosmos.Tests.Build.Analyzer.Patcher/TestResults/Cosmos.Tests.Build.Analyzer.Patcher.trx | |
| asm-tests: | |
| name: Run Cosmos.Build.Asm.Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| steps: | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: π οΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: π§ Cache Build Tools | |
| id: cache-tools | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cosmos/tools | |
| key: cosmos-tools-linux-x64-${{ hashFiles('.github/workflows/build-tools.yml') }} | |
| - name: β¬οΈ Download Build Tools | |
| if: steps.cache-tools.outputs.cache-hit != 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TOOLS_DIR="$HOME/.cosmos/tools" | |
| mkdir -p "$TOOLS_DIR" | |
| echo "Downloading tools from release: tools-latest" | |
| for asset in llvm-tools xorriso qemu; do | |
| gh release download tools-latest --pattern "${asset}-*-linux-x64.tar.gz" --dir /tmp/cosmos-tools | |
| tar xzf /tmp/cosmos-tools/${asset}-*-linux-x64.tar.gz -C "$TOOLS_DIR" | |
| done | |
| - name: π Add Tools to PATH | |
| run: | | |
| TOOLS_DIR="$HOME/.cosmos/tools" | |
| echo "$TOOLS_DIR/llvm-tools/bin" >> $GITHUB_PATH | |
| echo "$TOOLS_DIR/xorriso" >> $GITHUB_PATH | |
| echo "$TOOLS_DIR/qemu" >> $GITHUB_PATH | |
| - name: π Restore Dependencies | |
| run: dotnet restore ./tests/Cosmos.Tests.Build.Asm/Cosmos.Tests.Build.Asm.csproj | |
| - name: π¨ Build Cosmos.Patcher | |
| run: dotnet build ./src/Cosmos.Patcher/Cosmos.Patcher.csproj | |
| - name: π¨ Build Cosmos.Build.Patcher | |
| run: dotnet build ./src/Cosmos.Build.Patcher/Cosmos.Build.Patcher.csproj | |
| - name: π¨ Build Cosmos.Build.Asm.Test | |
| run: dotnet build ./tests/Cosmos.Tests.Build.Asm/Cosmos.Tests.Build.Asm.csproj --configuration Debug --no-restore | |
| - name: π Run Tests | |
| run: dotnet test ./tests/Cosmos.Tests.Build.Asm/Cosmos.Tests.Build.Asm.csproj --no-build --configuration Debug --logger "trx;LogFileName=Cosmos.Tests.Build.Asm.trx" | |
| - name: π€ Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cosmos.Build.Asm.Test-Results | |
| path: ./tests/Cosmos.Tests.Build.Asm/TestResults/Cosmos.Tests.Build.Asm.trx | |
| build-cache-tests: | |
| name: Run Build Cache Tests | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Clear NuGet Cache | |
| run: dotnet nuget locals all --clear | |
| - name: Build and Install Cosmos Packages | |
| run: ./.devcontainer/postCreateCommand.sh | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| - name: π§ Cache Build Tools | |
| id: cache-tools | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cosmos/tools | |
| key: cosmos-tools-linux-x64-${{ hashFiles('.github/workflows/build-tools.yml') }} | |
| - name: β¬οΈ Download Build Tools | |
| if: steps.cache-tools.outputs.cache-hit != 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TOOLS_DIR="$HOME/.cosmos/tools" | |
| mkdir -p "$TOOLS_DIR" | |
| echo "Downloading tools from release: tools-latest" | |
| for asset in llvm-tools xorriso qemu; do | |
| gh release download tools-latest --pattern "${asset}-*-linux-x64.tar.gz" --dir /tmp/cosmos-tools | |
| tar xzf /tmp/cosmos-tools/${asset}-*-linux-x64.tar.gz -C "$TOOLS_DIR" | |
| done | |
| - name: π Add Tools to PATH | |
| run: | | |
| TOOLS_DIR="$HOME/.cosmos/tools" | |
| echo "$TOOLS_DIR/llvm-tools/bin" >> $GITHUB_PATH | |
| echo "$TOOLS_DIR/xorriso" >> $GITHUB_PATH | |
| echo "$TOOLS_DIR/qemu" >> $GITHUB_PATH | |
| - name: Build Test Project | |
| run: dotnet build ./tests/Cosmos.Tests.BuildCache/Cosmos.Tests.BuildCache.csproj --configuration Debug | |
| - name: Run Build Cache Tests | |
| run: dotnet test ./tests/Cosmos.Tests.BuildCache/Cosmos.Tests.BuildCache.csproj --no-build --configuration Debug --logger "trx;LogFileName=Cosmos.Tests.BuildCache.trx" -v normal | |
| env: | |
| PATH: ${{ github.workspace }}/.dotnet/tools:$HOME/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: Cosmos.Tests.BuildCache-Results | |
| path: ./tests/Cosmos.Tests.BuildCache/TestResults/Cosmos.Tests.BuildCache.trx | |
| windows-iso-tests: | |
| name: Run ISO Build Tests - Windows (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ windows-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| arch: [ x64, arm64 ] | |
| include: | |
| - arch: x64 | |
| rid: linux-x64 | |
| - arch: arm64 | |
| rid: linux-arm64 | |
| steps: | |
| - name: π οΈ Enable long paths in Git | |
| run: git config --system core.longpaths true | |
| shell: pwsh | |
| - name: π₯ Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: π οΈ Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: ποΈ Clear NuGet Cache | |
| run: dotnet nuget locals all --clear | |
| - name: π Compile Packages (multi-arch) | |
| shell: pwsh | |
| run: ./.devcontainer/postCreateCommand.ps1 | |
| - name: π§ Install Build Tools | |
| run: cosmos install --tools --auto | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: π Verify Tools Installation | |
| run: cosmos check | |
| - name: Build ISO for ${{ matrix.arch }} | |
| shell: pwsh | |
| run: | | |
| if ("${{ matrix.arch }}" -eq "arm64") { | |
| $ARCH_DEFINE = "ARCH_ARM64" | |
| } else { | |
| $ARCH_DEFINE = "ARCH_X64" | |
| } | |
| dotnet publish -c Debug -r ${{ matrix.rid }} -p:DefineConstants=$ARCH_DEFINE -p:CosmosArch=${{ matrix.arch }} --verbosity detailed ./examples/DevKernel/DevKernel.csproj -o ./output-${{ matrix.arch }} | |
| - name: π΅οΈββοΈ Verify Output | |
| shell: pwsh | |
| run: | | |
| if (Test-Path "./output-${{ matrix.arch }}/DevKernel.iso") { | |
| Write-Host "ISO exists for ${{ matrix.arch }}" | |
| } else { | |
| Write-Error "ISO missing for ${{ matrix.arch }}" | |
| exit 1 | |
| } | |
| - name: π€ Upload ISO | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DevKernel-ISO-${{ github.job }}-${{ matrix.arch }}-${{ github.run_number }} | |
| path: ./output-${{ matrix.arch }}/DevKernel.iso | |
| macos-iso-tests: | |
| name: Run ISO Build Tests - macOS (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ macos-latest ] | |
| dotnet-version: [ 10.0.x ] | |
| arch: [ x64, arm64 ] | |
| include: | |
| - arch: x64 | |
| rid: linux-x64 | |
| - arch: arm64 | |
| rid: linux-arm64 | |
| steps: | |
| - name: π₯ Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: π οΈ Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: ποΈ Clear NuGet Cache | |
| run: dotnet nuget locals all --clear | |
| - name: π Compile Packages (multi-arch) | |
| run: ./.devcontainer/postCreateCommand.sh | |
| - name: π§ Install Build Tools | |
| run: cosmos install --tools --auto | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: π Verify Tools Installation | |
| run: cosmos check | |
| - name: Build ISO for ${{ matrix.arch }} | |
| run: | | |
| if [ "${{ matrix.arch }}" = "arm64" ]; then | |
| ARCH_DEFINE="ARCH_ARM64" | |
| else | |
| ARCH_DEFINE="ARCH_X64" | |
| fi | |
| dotnet publish -c Debug -r ${{ matrix.rid }} -p:DefineConstants="$ARCH_DEFINE" -p:CosmosArch=${{ matrix.arch }} --verbosity detailed ./examples/DevKernel/DevKernel.csproj -o ./output-${{ matrix.arch }} | |
| - name: π΅οΈββοΈ Verify Output | |
| run: | | |
| [ -f ./output-${{ matrix.arch }}/DevKernel.iso ] && echo "ISO exists for ${{ matrix.arch }}" || (echo "ISO missing for ${{ matrix.arch }}" && exit 1) | |
| - name: π€ Upload ISO | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DevKernel-ISO-macOS-${{ matrix.arch }}-${{ github.run_number }} | |
| path: ./output-${{ matrix.arch }}/DevKernel.iso |