Skip to content

Eliminate factory delegates from TypeDefinition (#149) #383

Eliminate factory delegates from TypeDefinition (#149)

Eliminate factory delegates from TypeDefinition (#149) #383

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore MLIR.slnx
- name: Build
run: dotnet build MLIR.slnx --configuration Release --no-restore
- name: Test
run: dotnet test MLIR.slnx --configuration Release --no-build
- name: Run head benchmarks
run: dotnet run --project tools/TableGen.Benchmarks/TableGen.Benchmarks.csproj -c Release --no-build -- run --output artifacts/benchmarks/head.json --warmup-duration-ms 250 --duration-ms 1000
- name: Benchmark summary
if: github.event_name != 'pull_request'
run: |
{
echo "## TableGen Interpreter Benchmarks"
echo
echo "Head benchmark results were written to \`artifacts/benchmarks/head.json\`."
} >> "$GITHUB_STEP_SUMMARY"
- name: Run base benchmarks
if: github.event_name == 'pull_request'
run: |
git worktree add /tmp/mlir-base "${{ github.event.pull_request.base.sha }}"
dotnet run --project /tmp/mlir-base/tools/TableGen.Benchmarks/TableGen.Benchmarks.csproj -c Release -- run --output /tmp/mlir-base/artifacts/benchmarks/base.json --warmup-duration-ms 250 --duration-ms 1000
- name: Compare benchmark results
if: github.event_name == 'pull_request'
run: |
dotnet run --project tools/TableGen.Benchmarks/TableGen.Benchmarks.csproj -c Release --no-build -- compare --baseline /tmp/mlir-base/artifacts/benchmarks/base.json --candidate artifacts/benchmarks/head.json --output artifacts/benchmarks/compare.md
cat artifacts/benchmarks/compare.md >> "$GITHUB_STEP_SUMMARY"
- name: Publish sticky benchmark PR comment
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: marocchino/sticky-pull-request-comment@v2
with:
header: tablegen-benchmarks
path: artifacts/benchmarks/compare.md
recreate: true
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: tablegen-benchmarks
if-no-files-found: ignore
path: |
artifacts/benchmarks/head.json
artifacts/benchmarks/compare.md