Merge pull request #3516 from nojaf/fix-3514 #5837
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 main | |
| on: [push, pull_request] | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| cache: true | |
| cache-dependency-path: Directory.Packages.props | |
| - name: Init | |
| run: dotnet fsi build.fsx -p Init | |
| - name: Build | |
| run: dotnet fsi build.fsx | |
| - name: Benchmark | |
| run: dotnet fsi build.fsx -p Benchmark | |
| - name: "trigger fantomas-tools action" | |
| if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/main' | |
| run: "curl -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token ${{secrets.FANTOMAS_TOOLS_TOKEN}}' --request POST --data '{\"event_type\": \"fantomas-commit-on-main\"}' https://api.github.com/repos/fsprojects/fantomas-tools/dispatches" | |
| - name: "Documentation" | |
| if: matrix.os == 'windows-latest' && github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./output | |
| analyze: | |
| name: Analyze solution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| cache: true | |
| cache-dependency-path: Directory.Packages.props | |
| - name: Run analyzers | |
| run: dotnet fsi build.fsx -- -p Analyze | |
| # always(), because the run this most wants to report on is the one that just failed. | |
| # Without it a finding at error severity would take the report down with it. | |
| - name: Upload merged SARIF | |
| if: always() && (github.event_name != 'push' || github.actor != 'dependabot[bot]') | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: analysis.sarif | |
| # Builds the project in a dev container | |
| build-devcontainer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Build and run dev container task | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| runCmd: dotnet fsi build.fsx |