Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 26, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original description:

Implement a reusable Azure DevOps template for F# compiler regression testing, integrated with the existing PR pipeline infrastructure.

Full PR Description:
This PR implements a reusable Azure DevOps template for F# compiler regression testing that integrates with the existing PR pipeline infrastructure.

Overview

The new template (eng/templates/regression-test-jobs.yml) provides a standardized way to test the F# compiler against real-world F# libraries, helping catch regressions early in the development process.

Key Features

  • Template-Based Architecture: Follows Azure DevOps best practices, the regression testing logic is implemented as a reusable template for consumption by multiple pipelines.
  • Integration with Existing Infrastructure: Integrates seamlessly with the existing EndToEndBuildTests job in azure-pipelines-PR.yml, eliminating duplication and reusing established build patterns.
  • Matrix-Based Testing: Supports testing multiple third-party libraries through a configurable matrix. Currently includes:
    • FSharpPlus (fsprojects/FSharpPlus at commit f614035b) - Tests advanced F# language features
  • Optimized Artifact Management: Publishes only the essential compiler directories (artifacts/bin/fsc and artifacts/bin/FSharp.Core) instead of the entire artifacts folder, reducing artifact size from 1.8GB to ~79MB while maintaining full functionality.

Complete Workflow

  1. Leverages artifacts from the existing EndToEndBuildTests job (optimized compiler build + UseLocalCompiler.Directory.Build.props)
  2. Checks out third-party repositories at specific commits for reproducible results
  3. Automatically detects .NET SDK requirements using useGlobalJson: true
  4. Uses F# script-based logic to properly inject UseLocalCompiler.Directory.Build.props references
  5. Configures the build environment via environment variables (LocalFSharpCompilerPath, LoadLocalFSharpBuild)
  6. Executes builds with MSBuild binary logging enabled
  7. Publishes focused binary log artifacts for diagnosis

Template Structure

The template defines parameterized jobs that can be easily extended:

# In azure-pipelines-PR.yml
- template: /eng/templates/regression-test-jobs.yml
  parameters:
    testMatrix:
    - repo: fsprojects/FSharpPlus
      commit: f614035b75922aba41ed6a36c2fc986a2171d2b8
      buildScript: build.cmd
      displayName: FSharpPlus

Integration Points

  • Modified EndToEndBuildTests: Now publishes optimized FSharpCompilerFscArtifacts and FSharpCoreArtifacts along with UseLocalCompilerProps artifacts
  • PR Pipeline Integration: Regression tests run automatically as part of PR builds, depending on EndToEndBuildTests
  • Parallel Execution: Each repository in the test matrix runs as a separate job in parallel

Extensibility

Adding new libraries requires only updating the testMatrix parameter with repository details, commit SHA, and build script. The template handles all environment setup and artifact management automatically.

This template-based approach eliminates code duplication, follows Azure DevOps best practices, provides efficient artifact management, and establishes a foundation for expanding regression testing coverage across the F# ecosystem.


Files and changes to apply:

  1. Add eng/templates/regression-test-jobs.yml implementing the regression test job template as in the previous PR.
  2. Update azure-pipelines-PR.yml to publish focused artifacts and invoke the regression test template with a matrix containing FSharpPlus.
  3. Add documentation file docs/regression-testing-pipeline.md explaining the design and usage, as in the previous PR.

All details, workflow, and YAML logic must match the solution in the previous PR (#18803).

References:

All content and YAML logic should be taken from the previous PR, but this must be a new PR from scratch.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor

✅ No release notes required

@T-Gro
Copy link
Member

T-Gro commented Aug 28, 2025

@copilot : Do it please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

2 participants