Repository navigation
Update FSharp.Analyzers.SDK and Ionide.Analyzers to SDK 0.42 #3091
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: Build and test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - nightly | |
| paths-ignore: | |
| - ".github" | |
| - ".vscode" | |
| pull_request: | |
| paths-ignore: | |
| - ".github" | |
| - ".vscode" | |
| jobs: | |
| build: | |
| env: | |
| TEST_TIMEOUT_MINUTES: 40 | |
| FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts | |
| DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET RCs to participate in rollforward as expected. | |
| DOTNET_INSTALL_DIR: ".dotnet" | |
| timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-latest | |
| - macos-15 | |
| - ubuntu-latest | |
| dotnet-version: ["10.x"] | |
| use-transparent-compiler: | |
| - "TransparentCompiler" | |
| - "BackgroundCompiler" | |
| workspace-loader: | |
| - "WorkspaceLoader" | |
| # - "ProjectGraph" # this is disable because it just adds too much time to the build | |
| # these entries will mesh with the above combinations. FSAC targets net10.0 only | |
| # (FSharp.Analyzers.SDK does), so there is one runtime leg per OS and compiler. | |
| include: | |
| # net10.0 runtime | |
| - global-json-file: "global.json" | |
| dotnet-version: "10.x" | |
| include-prerelease: true | |
| label: "10.0" | |
| test_tfm: net10.0 | |
| fail-fast: false # we have timing issues on some OS, so we want them all to run | |
| runs-on: ${{ matrix.os }} | |
| name: Build on ${{matrix.os}} for ${{ matrix.label }} ${{ matrix.workspace-loader }} ${{ matrix.use-transparent-compiler }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # install the runtime the tests will execute on, and the .NET 8 SDK: the Test Explorer | |
| # sample projects target net8.0 and run, and a test loads a project whose global.json | |
| # pins SDK 8, the way users with net8.0 projects can keep doing. | |
| - name: Setup .NET test runtime | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| dotnet-version: | | |
| 8.x | |
| ${{ matrix.dotnet-version }} | |
| # Build everything with the .NET 10 SDK. Paket 12 is a net10.0-only tool as well. | |
| - name: Setup .NET 10 build SDK | |
| id: build-sdk | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| dotnet-version: "10.x" | |
| # remove global.json so that the env configuration takes precedence | |
| - name: Purge global.json | |
| run: rm global.json | |
| - name: Create global.json | |
| run: dotnet new globaljson --sdk-version '${{ steps.build-sdk.outputs.dotnet-version }}' --roll-forward latestMinor | |
| # let's make sure we're on the version we think we are. | |
| - name: Announce .NET version | |
| run: dotnet --info | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Check format | |
| run: dotnet fantomas check . | |
| env: | |
| DOTNET_ROLL_FORWARD: LatestMajor | |
| DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 | |
| # Ensure the scaffolding code can still add items to the existing code. | |
| # - name: EnsureCanScaffoldCodeFix | |
| # run: dotnet fsi build.fsx -- -p EnsureCanScaffoldCodeFix | |
| # Restore once before the build, and stop the build from doing it again. Paket.Restore.targets starts a | |
| # `paket restore` for every project, even when nothing changed, and on macOS runners one of these parallel | |
| # processes is sometimes killed (exit code 137), which fails the build. | |
| - name: Restore packages | |
| run: dotnet paket restore | |
| - name: Run Build | |
| run: dotnet build -c Release -p:PaketDisableGlobalRestore=true | |
| - name: Run and report tests | |
| run: dotnet fsi build.fsx -- -p 'test-ci:${{ matrix.test_tfm }}' | |
| env: | |
| USE_TRANSPARENT_COMPILER: ${{ matrix.use-transparent-compiler }} | |
| USE_WORKSPACE_LOADER: ${{ matrix.workspace-loader }} | |
| analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| # fsharp-analyzers 0.38 and later run on .NET 10 | |
| dotnet-version: "10.x" | |
| - name: Restore tools | |
| run: dotnet tool restore | |
| - name: Run analyzers | |
| run: dotnet build -t:AnalyzeSolution -p:TargetFramework=net10.0 | |
| # SARIF v3 requires categories to be used per file and since | |
| # Github Actions doesn't know what a for loop is I'm just ignoring this for now. | |
| # Otherwise we have to generate a matrix and upload the files for the next job | |
| # to use. What a mess. | |
| # - name: Upload SARIF file | |
| # uses: github/codeql-action/upload-sarif@v2 | |
| # with: | |
| # sarif_file: analysisreports |