From 86088fd1891ae4494c2429d392378bf159a5b377 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 15 Nov 2024 07:55:35 +0100 Subject: [PATCH] feat: build with net9 --- .config/dotnet-tools.json | 19 +++---- .github/workflows/main.yml | 107 ++++++++++++++++++------------------- build.fsx | 2 +- global.json | 2 +- paket.lock | 11 ++-- 5 files changed, 68 insertions(+), 73 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bc2a0f10..9c89398a 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,25 +3,20 @@ "isRoot": true, "tools": { "paket": { - "version": "8.0.3", - "commands": [ - "paket" - ], + "version": "9.0.0", + "commands": ["paket"], "rollForward": false }, "csharpier": { "version": "0.29.2", - "commands": [ - "dotnet-csharpier" - ], - "rollForward": false + "commands": ["dotnet-csharpier"], + "rollForward": true }, "husky": { "version": "0.7.1", - "commands": [ - "husky" - ], + "commands": ["husky"], "rollForward": false } } -} \ No newline at end of file +} + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55f133f5..8ba0e4fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,62 +1,61 @@ name: Build and Test on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - runs-on: ${{ matrix.os }} + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup .NET 8.0 SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: "8.0.x" - - name: Build and Test - run: dotnet fsi build.fsx -- -p build - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: bin-${{matrix.os}} - path: bin/*.nupkg + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup .NET 9.0 SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "9.0.x" + - name: Build and Test + run: dotnet fsi build.fsx -- -p build + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: bin-${{matrix.os}} + path: bin/*.nupkg - generate-docs: - runs-on: windows-latest - needs: build - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup .NET 8.0 SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: "8.0.x" - - name: Build and Test - run: dotnet fsi build.fsx -- -p build - - name: Setup DocFX - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: install docfx - - name: DocFX Build - working-directory: docs - run: docfx docfx.json - continue-on-error: false - - name: Publish - if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_site - force_orphan: true + generate-docs: + runs-on: windows-latest + needs: build + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup .NET 9.0 SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "9.0.x" + - name: Build and Test + run: dotnet fsi build.fsx -- -p build + - name: Setup DocFX + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: install docfx + - name: DocFX Build + working-directory: docs + run: docfx docfx.json + continue-on-error: false + - name: Publish + if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site + force_orphan: true diff --git a/build.fsx b/build.fsx index aa2fbe5d..4ce2f1cf 100644 --- a/build.fsx +++ b/build.fsx @@ -1,4 +1,4 @@ -#r "nuget: Fun.Build, 1.0.5" +#r "nuget: Fun.Build, 1.1.14" #r "nuget: Fake.DotNet.AssemblyInfoFile" #r "nuget: Fake.DotNet.Paket" diff --git a/global.json b/global.json index ba341c54..cdbb589e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.401", + "version": "9.0.100", "rollForward": "latestFeature" } } diff --git a/paket.lock b/paket.lock index 4edfd10c..ce1acffc 100644 --- a/paket.lock +++ b/paket.lock @@ -23,16 +23,17 @@ NUGET SixLabors.ImageSharp.Drawing (2.1.4) SixLabors.Fonts (>= 2.0.4) SixLabors.ImageSharp (>= 3.1.5) - System.Collections.Immutable (8.0) - System.IO.Packaging (8.0.1) - System.Reflection.Metadata (8.0.1) - System.Text.Encoding.CodePages (8.0) + System.Collections.Immutable (9.0) + System.IO.Packaging (9.0) + System.Reflection.Metadata (9.0) + System.Collections.Immutable (>= 9.0) + System.Text.Encoding.CodePages (9.0) xunit (2.9.2) xunit.analyzers (>= 1.16) xunit.assert (>= 2.9.2) xunit.core (2.9.2) xunit.abstractions (2.0.3) - xunit.analyzers (1.16) + xunit.analyzers (1.17) xunit.assert (2.9.2) xunit.core (2.9.2) xunit.extensibility.core (2.9.2)