Bump Microsoft.Build.Tasks.Core and Microsoft.Build.Utilities.Core #1472
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: .NES | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: check for junk files | |
| shell: bash | |
| run: | | |
| found=0 | |
| # Detect 0-byte files (excluding .gitkeep and build output dirs) | |
| while IFS= read -r f; do | |
| echo "::error file=$f::Zero-byte file detected: $f" | |
| found=1 | |
| done < <(find . -not -path './.git/*' -not -path '*/bin/*' -not -path '*/obj/*' \ | |
| -type f -empty -not -name '.gitkeep') | |
| # Detect common junk / temp files | |
| while IFS= read -r f; do | |
| echo "::error file=$f::Junk file detected: $f" | |
| found=1 | |
| done < <(find . -not -path './.git/*' -not -path '*/bin/*' -not -path '*/obj/*' \ | |
| -type f \( -name '*.tmp' -o -name '*.bak' -o -name '*~' -o -name '*.orig' \ | |
| -o -name '*.swp' -o -name '*.swo' -o -name '.DS_Store' -o -name 'Thumbs.db' \)) | |
| if [ "$found" -ne 0 ]; then | |
| echo "::error::Junk files found in the repository. Please remove them." | |
| exit 1 | |
| fi | |
| - name: install .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.x | |
| - name: cache Mesen downloads | |
| uses: ./.github/workflows/cache-mesen | |
| - name: build | |
| run: dotnet build -bl:build-debug.binlog && dotnet build -c Release -bl:build-release.binlog | |
| - name: test | |
| run: dotnet test --no-build --verbosity normal && dotnet test --no-build --verbosity normal -c Release | |
| - name: samples | |
| run: dotnet build samples/samples.sln -bl:samples-debug.binlog && dotnet build samples/samples.sln -c Release -bl:samples-release.binlog | |
| - name: shutdown (best effort) | |
| if: always() | |
| run: dotnet build-server shutdown | |
| continue-on-error: true # best-effort cleanup; failures intentionally ignored | |
| - name: upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: logs | |
| path: '*.binlog' | |
| if-no-files-found: error | |
| - name: upload ROMs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ROMs | |
| path: | | |
| samples/*/bin/**/*.nes | |
| samples/*/bin/**/*.dll | |
| if-no-files-found: error | |
| - name: upload nupkgs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: nupkgs | |
| path: | | |
| bin/Release/*.nupkg | |
| if-no-files-found: error | |
| smoke-test: | |
| needs: build | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [windows-latest, macos-latest] | |
| # Ubuntu excluded: Mesen native core crashes with std::bad_cast on | |
| # headless Linux even with SDL2 installed (upstream Mesen issue) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github/workflows/cache-mesen | |
| scripts/smoke-test.lua | |
| src/dotnes.mesen/build/dotnes.mesen.targets | |
| sparse-checkout-cone-mode: false | |
| - name: install .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.x | |
| - name: install SDL2 (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install sdl2 | |
| - name: cache Mesen downloads | |
| uses: ./.github/workflows/cache-mesen | |
| - name: download nupkgs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: nupkgs | |
| path: nupkgs | |
| - name: install template | |
| shell: bash | |
| run: dotnet new install nupkgs/dotnes.templates.*.nupkg | |
| - name: create project | |
| run: dotnet new nes --output smoketest | |
| - name: add local NuGet source | |
| run: dotnet nuget add source "${{ github.workspace }}/nupkgs" --name local | |
| - name: build project | |
| run: dotnet build smoketest/smoketest.csproj -bl:smoketest-build.binlog | |
| - name: run smoke test | |
| run: > | |
| dotnet run --project smoketest/smoketest.csproj | |
| -p:MesenTestRunner=true | |
| -p:MesenTimeout=10 | |
| "-p:MesenLuaScript=${{ github.workspace }}/scripts/smoke-test.lua" | |
| -bl:smoketest-run.binlog | |
| - name: upload smoke test logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: smoke-test-logs-${{ matrix.os }} | |
| path: '*.binlog' | |