Skip to content

feat: Add XSD Code Generator for ISO 20022 message classes #18

feat: Add XSD Code Generator for ISO 20022 message classes

feat: Add XSD Code Generator for ISO 20022 message classes #18

name: Build e Performance Analysis
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
analyze-build:
runs-on: ubuntu-24.04
timeout-minutes: 90
env:
DOTNET_TieredPGO: 0
DOTNET_HOTLOOPCOUNT: 0
steps:
- uses: actions/checkout@v4
- name: Cache NuGet global-packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-cache-${{ hashFiles('**/*.csproj','**/*.sln') }}
restore-keys: nuget-cache-
- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup .NET 6 runtime (para ferramentas compatíveis)
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
package-type: runtime
- name: Restore dependencies
run: dotnet restore Iso20022Library.sln
- name: Create artifacts directory
run: mkdir -p artifacts
- name: Build com análise de performance + segurança
id: msbuild
run: |
dotnet msbuild Iso20022Library.sln \
/t:Rebuild /p:Configuration=Release \
/maxcpucount /graphBuild:true /nodeReuse:false /noAutoResponse \
/consoleLoggerParameters:"PerformanceSummary;ShowCommandLine" \
/detailedSummary /bl:artifacts/build-${{ github.run_id }}.binlog \
/profileEvaluation:artifacts/profile-eval.md \
/warnAsError \
/p:RunCodeAnalysis=true \
/p:TreatWarningsAsErrors=true \
/p:EnableNETAnalyzers=true \
/p:AnalysisMode=AllEnabledByDefault \
/p:AnalysisLevel=8.0
continue-on-error: true
- name: Install MSBuild Structured Log Viewer CLI
run: dotnet tool install --global MSBuild.StructuredLogger --version 2.2.206
continue-on-error: true
- name: Install Meziantou.MSBuild.Tools (global tool)
run: dotnet tool install --global Meziantou.MSBuild.Tools --version 1.0.27
continue-on-error: true
- name: Add dotnet tools to PATH
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Detect Double‑Writes in binlog (with fallback)
run: |
if command -v Meziantou.MSBuild.Tools &> /dev/null; then
echo "Attempting to detect double-writes with Meziantou.MSBuild.Tools..."
Meziantou.MSBuild.Tools detect-double-writes --path artifacts/build-${{ github.run_id }}.binlog || echo "Meziantou.MSBuild.Tools failed - tool may not support this binlog version"
else
echo "Meziantou.MSBuild.Tools not available, skipping double-write detection"
fi
continue-on-error: true
- name: Analyze binlog with MSBuild Structured Logger
run: |
if command -v StructuredLogViewer &> /dev/null; then
echo "Analyzing binlog with MSBuild Structured Logger..."
StructuredLogViewer artifacts/build-${{ github.run_id }}.binlog --verbosity detailed > artifacts/binlog-analysis.txt || echo "StructuredLogViewer analysis failed"
else
echo "StructuredLogViewer not available"
fi
continue-on-error: true
- name: Basic binlog inspection
run: |
echo "Basic binlog file information:"
ls -la artifacts/build-${{ github.run_id }}.binlog
file artifacts/build-${{ github.run_id }}.binlog || echo "file command not available"
continue-on-error: true
- name: Upload artifacts (logs, binlog, reports)
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: artifacts/
- name: Summary Log
run: |
echo "Artifacts disponíveis:"
echo "- build-${{ github.run_id }}.binlog (MSBuild binary log)"
echo "- profile-eval.md (MSBuild evaluation profile)"
echo "- binlog-analysis.txt (Structured log analysis, se disponível)"
echo ""
echo "Para análise detalhada local:"
echo "- Use o MSBuild Structured Log Viewer (https://msbuildlog.com/)"
echo "- Ou execute: dotnet tool install -g MSBuild.StructuredLogger"
echo ""
ls -la artifacts/ || echo "Erro ao listar artifacts"