From 0e5e19f810623c47836becfebafbf20b192e37e0 Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 28 Mar 2023 14:41:18 +0200 Subject: [PATCH 01/22] Only build FSharp.Core --- .github/workflows/docs.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fe5b6f8c0..70f75e459 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,8 +37,8 @@ jobs: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Build fsharp main (turn of CI build status) - run: eng\CIBuild.cmd -noVisualStudio + - name: Build FSharp.Core in fsharp main + run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - name: Checkout FSharp.Formatting main uses: actions/checkout@v3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6a2bf2e03..edfcaa773 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -32,8 +32,8 @@ jobs: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Build fsharp main (turn of CI build status) - run: eng\CIBuild.cmd -noVisualStudio + - name: Build FSharp.Core in fsharp main + run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - name: Checkout FSharp.Formatting main uses: actions/checkout@v3 From db574a846b805db36d35bc9ab7d12b41920739b1 Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 28 Mar 2023 14:50:34 +0200 Subject: [PATCH 02/22] Install 7.0.202 as well. --- .github/workflows/docs.yml | 4 +++- .github/workflows/pr.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 70f75e459..288d58c9e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,9 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.100 + dotnet-version: | + 7.0.100 + 7.0.202 - name: Restore tools run: dotnet tool restore - name: Restore projects diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index edfcaa773..4773b36cb 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,7 +21,9 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.100 + dotnet-version: | + 7.0.100 + 7.0.202 - name: Restore tools run: dotnet tool restore - name: Restore projects From e97fc82ecceee52e068a25de2c11095eae88c4dc Mon Sep 17 00:00:00 2001 From: nojaf Date: Thu, 13 Apr 2023 17:46:25 +0200 Subject: [PATCH 03/22] Get required SDKs for both projects. --- .github/workflows/docs.yml | 24 +++++++++++++----------- .github/workflows/pr.yml | 24 +++++++++++++----------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 288d58c9e..77a796295 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,22 +23,20 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 7.0.100 - 7.0.202 - - name: Restore tools - run: dotnet tool restore - - name: Restore projects - run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Checkout fsharp main uses: actions/checkout@v3 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main + - name: Setup .NET Core for FSharp + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSHARP_DIR }}/global.json + - name: Restore tools + run: dotnet tool restore + - name: Restore projects + run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} @@ -48,11 +46,15 @@ jobs: repository: fsprojects/FSharp.Formatting path: ${{ env.FSF_DIR }} ref: main + - name: Setup .NET Core for FSharp.Formatting + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSF_DIR }}/global.json - name: Build FSharp.Formatting main run: .\build -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs - run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net7.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4773b36cb..c6f191035 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,22 +18,20 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 7.0.100 - 7.0.202 - - name: Restore tools - run: dotnet tool restore - - name: Restore projects - run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Checkout fsharp main uses: actions/checkout@v3 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main + - name: Setup .NET Core for FSharp + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSHARP_DIR }}/global.json + - name: Restore tools + run: dotnet tool restore + - name: Restore projects + run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} @@ -43,8 +41,12 @@ jobs: repository: fsprojects/FSharp.Formatting path: ${{ env.FSF_DIR }} ref: main + - name: Setup .NET Core for FSharp.Formatting + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSF_DIR }}/global.json - name: Build FSharp.Formatting main run: .\build -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs - run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net7.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} From 239e71b2286b0512fe8198395cb0f77f4832e9d6 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 14:34:33 +0200 Subject: [PATCH 04/22] Fix + simplify docs publishing 1. Run on ubuntu, there's no reason (I think) to run on windows. 2. First install SDK for both F# and formatting, to avoid blocking, then build. 3. Avoid additional restore step and tools restoring for F# repo, since they're not really needed. --- .github/workflows/docs.yml | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 77a796295..cf2328004 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,15 +12,11 @@ on: env: FSHARP_DIR: fsharp FSF_DIR: FSharp.Formatting - + BUILDING_USING_DOTNET: true jobs: build: - strategy: - matrix: - os: [windows-latest] - runs-on: ${{ matrix.os }} - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Checkout fsharp main @@ -29,32 +25,28 @@ jobs: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Setup .NET Core for FSharp - uses: actions/setup-dotnet@v3 - with: - global-json-file: ${{ env.FSHARP_DIR }}/global.json - - name: Restore tools - run: dotnet tool restore - - name: Restore projects - run: dotnet restore FSharp.Core\FSharp.Core.fsproj - - name: Build FSharp.Core in fsharp main - run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true - working-directory: ${{ env.FSHARP_DIR }} - name: Checkout FSharp.Formatting main uses: actions/checkout@v3 with: repository: fsprojects/FSharp.Formatting path: ${{ env.FSF_DIR }} ref: main - - name: Setup .NET Core for FSharp.Formatting + - name: Setup .NET for FSharp + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSHARP_DIR }}/global.json + - name: Setup .NET for FSharp.Formatting uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSF_DIR }}/global.json + - name: Build FSharp.Core in fsharp main + run: dotnet build --restore src/FSharp.Core/FSharp.Core.fsproj + working-directory: ${{ env.FSHARP_DIR }} - name: Build FSharp.Formatting main - run: .\build -t Build + run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs - run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From b2089f525d3db31c80b48ecabd51f78fc478ac22 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 14:42:24 +0200 Subject: [PATCH 05/22] Update pr.yml --- .github/workflows/pr.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c6f191035..16c65eb01 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,14 +8,11 @@ on: env: FSHARP_DIR: fsharp FSF_DIR: FSharp.Formatting + BUILDING_USING_DOTNET: true jobs: build: - strategy: - matrix: - os: [windows-latest] - runs-on: ${{ matrix.os }} - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Checkout fsharp main @@ -24,29 +21,25 @@ jobs: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Setup .NET Core for FSharp - uses: actions/setup-dotnet@v3 - with: - global-json-file: ${{ env.FSHARP_DIR }}/global.json - - name: Restore tools - run: dotnet tool restore - - name: Restore projects - run: dotnet restore FSharp.Core\FSharp.Core.fsproj - - name: Build FSharp.Core in fsharp main - run: dotnet build .\src\FSharp.Core\ /p:BUILDING_USING_DOTNET=true - working-directory: ${{ env.FSHARP_DIR }} - name: Checkout FSharp.Formatting main uses: actions/checkout@v3 with: repository: fsprojects/FSharp.Formatting path: ${{ env.FSF_DIR }} ref: main - - name: Setup .NET Core for FSharp.Formatting + - name: Setup .NET for FSharp + uses: actions/setup-dotnet@v3 + with: + global-json-file: ${{ env.FSHARP_DIR }}/global.json + - name: Setup .NET for FSharp.Formatting uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSF_DIR }}/global.json + - name: Build FSharp.Core in fsharp main + run: dotnet build --restore src/FSharp.Core/FSharp.Core.fsproj + working-directory: ${{ env.FSHARP_DIR }} - name: Build FSharp.Formatting main - run: .\build -t Build + run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs - run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} From b027e72fca3ca809dc8fcf22b3797b8fdb4c66b3 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 15:26:51 +0200 Subject: [PATCH 06/22] Fix docs.yml --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cf2328004..3dd2646f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,6 +45,8 @@ jobs: - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} + - name: Build local FSharp.Core project in current repo + run: dotnet build --restore FSharp.Core/FSharp.Core.fsproj - name: Run fsdocs run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy From f55fcdd5fc359cad3dd0493dc06e7cf388018cd2 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 15:40:40 +0200 Subject: [PATCH 07/22] Update docs.yml --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3dd2646f4..be9f4b47f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,8 +45,8 @@ jobs: - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - - name: Build local FSharp.Core project in current repo - run: dotnet build --restore FSharp.Core/FSharp.Core.fsproj + - name: Restore local FSharp.Core project in current repo + run: dotnet restore FSharp.Core/FSharp.Core.fsproj - name: Run fsdocs run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy From 9c2cdb18b42a919a23209009b8d9262aded01406 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 15:41:48 +0200 Subject: [PATCH 08/22] Update pr.yml --- .github/workflows/pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 16c65eb01..8381cbdb3 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -41,5 +41,7 @@ jobs: - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} + - name: Restore local FSharp.Core project in current repo + run: dotnet restore FSharp.Core/FSharp.Core.fsproj - name: Run fsdocs run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} From fb0e9997ac6a7335137a59310b3d68a7d873129c Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 15:48:22 +0200 Subject: [PATCH 09/22] Update docs.yml --- .github/workflows/docs.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index be9f4b47f..8ff8aefda 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,6 @@ on: env: FSHARP_DIR: fsharp FSF_DIR: FSharp.Formatting - BUILDING_USING_DOTNET: true jobs: build: @@ -39,14 +38,14 @@ jobs: uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSF_DIR }}/global.json + - name: Restore local FSharp.Core project in current repo + run: dotnet restore FSharp.Core/FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main - run: dotnet build --restore src/FSharp.Core/FSharp.Core.fsproj + run: dotnet build src/FSharp.Core/FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - - name: Restore local FSharp.Core project in current repo - run: dotnet restore FSharp.Core/FSharp.Core.fsproj - name: Run fsdocs run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy From 240d7b084f91e242dbd5847453104390583eef51 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 15:52:53 +0200 Subject: [PATCH 10/22] Update docs.yml --- .github/workflows/docs.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8ff8aefda..a3ef05e3b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 - name: Checkout fsharp main @@ -39,15 +39,15 @@ jobs: with: global-json-file: ${{ env.FSF_DIR }}/global.json - name: Restore local FSharp.Core project in current repo - run: dotnet restore FSharp.Core/FSharp.Core.fsproj + run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main - run: dotnet build src/FSharp.Core/FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true + run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs - run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From a54ba6becde4ad57c9819f2a28618b189b15d348 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Thu, 18 May 2023 16:09:24 +0200 Subject: [PATCH 11/22] Update pr.yml --- .github/workflows/pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8381cbdb3..b3831824f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 - name: Checkout fsharp main @@ -35,13 +35,13 @@ jobs: uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSF_DIR }}/global.json + - name: Restore local FSharp.Core project in current repo + run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main - run: dotnet build --restore src/FSharp.Core/FSharp.Core.fsproj + run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - name: Build FSharp.Formatting main run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - - name: Restore local FSharp.Core project in current repo - run: dotnet restore FSharp.Core/FSharp.Core.fsproj - name: Run fsdocs run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} From bead2c1ec2467688496eb4b4ec3bbb07253624ee Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Sat, 1 Jul 2023 11:43:49 -0500 Subject: [PATCH 12/22] Force fsdocs to roll forward to latest major on invocation --- .github/workflows/docs.yml | 5 +++++ .github/workflows/pr.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a3ef05e3b..439f5ccce 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -47,6 +47,11 @@ jobs: run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs + env: + # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly + DOTNET_ROLL_FORWARD: "LatestMajor" + # need previews because .NET 8 is what's being used at runtime + DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b3831824f..d59a017c2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -44,4 +44,9 @@ jobs: run: dotnet fsi ./build.fsx -t Build working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs + env: + # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly + DOTNET_ROLL_FORWARD: "LatestMajor" + # need previews because .NET 8 is what's being used at runtime + DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} From b5c68724a05df48b7ef648477ceb9fa8e2d386cf Mon Sep 17 00:00:00 2001 From: nojaf Date: Sat, 11 Nov 2023 18:04:04 +0100 Subject: [PATCH 13/22] Update fsdocs --- .config/dotnet-tools.json | 12 +++++++++ .github/workflows/docs.yml | 18 +++---------- .github/workflows/pr.yml | 17 +++--------- .gitignore | 1 + README.md | 54 +++++++++----------------------------- 5 files changed, 32 insertions(+), 70 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 000000000..05b43454e --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "fsdocs-tool": { + "version": "20.0.0-alpha-009", + "commands": [ + "fsdocs" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 439f5ccce..258358272 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,48 +11,36 @@ on: env: FSHARP_DIR: fsharp - FSF_DIR: FSharp.Formatting jobs: build: runs-on: windows-latest steps: - uses: actions/checkout@v3 + - name: Restore tools + run: dotnet tool restore - name: Checkout fsharp main uses: actions/checkout@v3 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Checkout FSharp.Formatting main - uses: actions/checkout@v3 - with: - repository: fsprojects/FSharp.Formatting - path: ${{ env.FSF_DIR }} - ref: main - name: Setup .NET for FSharp uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - - name: Setup .NET for FSharp.Formatting - uses: actions/setup-dotnet@v3 - with: - global-json-file: ${{ env.FSF_DIR }}/global.json - name: Restore local FSharp.Core project in current repo run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - - name: Build FSharp.Formatting main - run: dotnet fsi ./build.fsx -t Build - working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs env: # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly DOTNET_ROLL_FORWARD: "LatestMajor" # need previews because .NET 8 is what's being used at runtime DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" - run: dotnet FSharp.Formatting\src\fsdocs-tool\bin\Release\net6.0\fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet fsdocs build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d59a017c2..cb030ab6d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,32 +21,21 @@ jobs: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} ref: main - - name: Checkout FSharp.Formatting main - uses: actions/checkout@v3 - with: - repository: fsprojects/FSharp.Formatting - path: ${{ env.FSF_DIR }} - ref: main - name: Setup .NET for FSharp uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - - name: Setup .NET for FSharp.Formatting - uses: actions/setup-dotnet@v3 - with: - global-json-file: ${{ env.FSF_DIR }}/global.json + - name: Restore tools + run: dotnet tool restore - name: Restore local FSharp.Core project in current repo run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main run: dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true working-directory: ${{ env.FSHARP_DIR }} - - name: Build FSharp.Formatting main - run: dotnet fsi ./build.fsx -t Build - working-directory: ${{ env.FSF_DIR }} - name: Run fsdocs env: # allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly DOTNET_ROLL_FORWARD: "LatestMajor" # need previews because .NET 8 is what's being used at runtime DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" - run: dotnet FSharp.Formatting/src/fsdocs-tool/bin/Release/net6.0/fsdocs.dll build --sourcefolder ${{ env.FSHARP_DIR }} + run: dotnet fsdocs build --sourcefolder ${{ env.FSHARP_DIR }} diff --git a/.gitignore b/.gitignore index 7ad752419..74f3eeb96 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ FSharp.Formatting/ FSharp.Core/obj/ tmp/ .idea/ +output/ \ No newline at end of file diff --git a/README.md b/README.md index 64dca2775..c5fa43ebf 100644 --- a/README.md +++ b/README.md @@ -9,45 +9,24 @@ signature files (`*.fsi`) in the FSharp.Core implementation. * Fork and clone locally, see below, as a subdirectory of your copy of `fsharp-core-docs` -* Contribute to [the FSharp.Core directory](https://github.com/dotnet/fsharp/tree/master/src/fsharp/FSharp.Core) - -* Use a local build, see below +* Contribute to [the FSharp.Core directory](https://github.com/dotnet/fsharp/tree/main/src/fsharp/FSharp.Core) * Submit work to `main` branch of -* Once accepted your work will be published through a rebuild here. Site rebuilds daily at 17:30 UTC, or submit a dummy pull request here to trigger. +* Update the `dotnet tool` if new versions are released. ## Contributing to Generation of API Docs The docs are generated by using `fsdocs` tool from FSharp.Formatting. If you want to improve the generation process: -* Contribute to the API Docs mode and/or HTML generator in [FSharp.Formatting.ApiDocs](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.ApiDocs) and [the `fsdocs` tool](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.CommandTool) - -* Use a local copy of these, see below, as a subdirectory of fsharp-core-docs - -* Submit work to the `master` branch of - -* Once accepted the new tooling will be published through a rebuild here, so submit a dummy pull request here that increments dummyVersion.txt - -## Contributing to Layout and Design - -These pages are currently using [the default template of the FSharp.Formatting tools](https://github.com/fsprojects/FSharp.Formatting/blob/master/docs/_template.html) -with its small amount of corresponding [CSS and JavaScript](https://github.com/fsprojects/FSharp.Formatting/tree/master/docs/content) - -See [FSharp.Formatting styling](https://fsprojects.github.io/FSharp.Formatting/styling.html) for information on styling for output generated by `fsdocs`. +* Contribute to the API Docs mode and/or HTML generator in [FSharp.Formatting.ApiDocs](https://github.com/fsprojects/FSharp.Formatting/tree/main/src/FSharp.Formatting.ApiDocs) and [the `fsdocs` tool](https://github.com/fsprojects/FSharp.Formatting/tree/main/src/FSharp.Formatting.CommandTool) -This template is *not* the long term plan (unless it is improved enough). We can improve the design - please help with this. +* Submit work to the `main` branch of -1. Copy the default template and CSS to `docs`. Rebuild as before. This template will be used instead of the default template. - -2. After you have identified fixes and improvements, contribute back to the default template of FSharp.Formatting, or submit your work here and we can assess that. This will help improve many F# libraries. - -Whatever improvements you make should eventually get copied across back into FSharp.Formatting (and the duplicated template and styling will then likely be removed from this repo once it's no longer needed). If the design diverges to be a completely different look and feel then we can make several templates available in FSharp.Formatting with this as one of them. +* Update the `dotnet tool` if new versions are released. ## Build steps -Eventually the build will just be - dotnet tool restore dotnet restore FSharp.Core dotnet fsdocs build @@ -56,34 +35,27 @@ For now, we want to pick up the latest copies of FSharp.Formatting and FSharp.Co (start in 'fsharp-core-docs') dotnet restore FSharp.Core + dotnet tool restore - (make 'fsharp-core-docs/fsharp' and 'fsharp-core-docs/FSharp.Formatting' ) + (make fsharp-compiler-docs/fsharp) git clone https://github.com/dotnet/fsharp --depth 1 -b main - git clone https://github.com/fsprojects/FSharp.Formatting --depth 1 (build 'fsharp-core-docs/fsharp') pushd fsharp - .\build -noVisualStudio - popd - - (build 'fsharp-core-docs/FSharp.Formatting') - pushd FSharp.Formatting - .\build -t Build + dotnet build src\FSharp.Core\FSharp.Core.fsproj /p:BUILDING_USING_DOTNET=true popd Then do iterative development using: (from 'fsharp-core-docs') - FSharp.Formatting\src\FSharp.Formatting.CommandTool\bin\Release\netcoreapp3.1\fsdocs.exe watch --sourcefolder fsharp + dotnet fsdocs watch --sourcefolder fsharp ## CI Pipeline -This repo is published via GitHub Actions. On each push to master, the docs are built, and the outputs (which are written to the `output` directory by fsdocs) are pushed to the `gh-pages` branch. This repo is configured to host using GitHub Pages from this branch, so once the generated files are pushed the update is nearly-instant. - -To build the very latest and freshest docs using the latest `fsdocs` tooling the CI does this: +This repo is published via GitHub Actions. On each push to main, the docs are built, and the outputs (which are written to the `output` directory by fsdocs) are pushed to the `gh-pages` branch. This repo is configured to host using GitHub Pages from this branch, so once the generated files are pushed the update is nearly-instant. -1. build dotnet/fsharp `main` branch (where we assume latest doc updates have been pushed) +To build the very latest and freshest docs the CI does this: -2. builds `FSharp.Formatting` master branch +1. build dotnet/fsharp `main` branch (where we assume latest doc updates have been pushed). -3. Uses that `FSharp.Formatting` tool to build the docs for the FSharp.Core built in step 1 +2. generate the documentation using the local dotnet fsdocs tool. From 8aa8450a37bf043abac39bf3c3d9e0bf79a19ed6 Mon Sep 17 00:00:00 2001 From: nojaf Date: Sat, 11 Nov 2023 19:15:48 +0100 Subject: [PATCH 14/22] Restore tools later --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 258358272..8d14f4fa3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,8 +17,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 - - name: Restore tools - run: dotnet tool restore - name: Checkout fsharp main uses: actions/checkout@v3 with: @@ -29,6 +27,8 @@ jobs: uses: actions/setup-dotnet@v3 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json + - name: Restore tools + run: dotnet tool restore - name: Restore local FSharp.Core project in current repo run: dotnet restore FSharp.Core\FSharp.Core.fsproj - name: Build FSharp.Core in fsharp main From d2206620bc5e65b48b07b140b2e9c1d94e51aad0 Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 15 Nov 2023 12:59:00 +0100 Subject: [PATCH 15/22] Add dependabot config --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..8ce023020 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "daily" From e7a346547dbaadc441b06b65608c07dab08d3fdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:59:41 +0000 Subject: [PATCH 16/22] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8d14f4fa3..363a95370 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,9 +16,9 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout fsharp main - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cb030ab6d..06298b669 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,9 +14,9 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout fsharp main - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} From bed14f9424ec05add18eca9aab521464cb0bc566 Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 22 Nov 2023 08:23:11 +0100 Subject: [PATCH 17/22] Bump fsdocs-tool to v20 alpha 13 --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 05b43454e..75d796f93 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fsdocs-tool": { - "version": "20.0.0-alpha-009", + "version": "20.0.0-alpha-013", "commands": [ "fsdocs" ] From b6e3515cf70b3d403e7e6aabdc4340dfc8c095fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:13:37 +0000 Subject: [PATCH 18/22] Bump actions/setup-dotnet from 3 to 4 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 2 +- .github/workflows/pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 363a95370..5e351ca0b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: path: ${{ env.FSHARP_DIR }} ref: main - name: Setup .NET for FSharp - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - name: Restore tools diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 06298b669..1f668568a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: path: ${{ env.FSHARP_DIR }} ref: main - name: Setup .NET for FSharp - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - name: Restore tools From 25f1776c2236a0f383ee6086d19254619b185409 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:16:54 +0000 Subject: [PATCH 19/22] Bump peaceiris/actions-gh-pages from 3 to 4 Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5e351ca0b..7a01e84bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,7 +42,7 @@ jobs: DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1" run: dotnet fsdocs build --sourcefolder ${{ env.FSHARP_DIR }} - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: personal_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./output From 77d80ae5b26ac9f636f5afe3ecd1cd82e2df79eb Mon Sep 17 00:00:00 2001 From: nojaf Date: Fri, 7 Jun 2024 09:03:53 +0200 Subject: [PATCH 20/22] Bump docs tool to 21 beta --- .config/dotnet-tools.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 75d796f93..8e8a9b579 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,10 +3,11 @@ "isRoot": true, "tools": { "fsdocs-tool": { - "version": "20.0.0-alpha-013", + "version": "21.0.0-beta-001", "commands": [ "fsdocs" - ] + ], + "rollForward": false } } } \ No newline at end of file From 75b0ec5366846ca4d0786af262754e17cebb5b47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:26:24 +0000 Subject: [PATCH 21/22] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7a01e84bf..bb8b215b4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,9 +16,9 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Checkout fsharp main - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1f668568a..469f59a0d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,9 +14,9 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Checkout fsharp main - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: dotnet/fsharp path: ${{ env.FSHARP_DIR }} From e1c7fba953ee2724238bc41e1b327e7d8fa641e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 13:14:50 +0000 Subject: [PATCH 22/22] Bump actions/setup-dotnet from 4 to 5 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4 to 5. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docs.yml | 2 +- .github/workflows/pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bb8b215b4..ce67b499f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: path: ${{ env.FSHARP_DIR }} ref: main - name: Setup .NET for FSharp - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - name: Restore tools diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 469f59a0d..1c04d2633 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: path: ${{ env.FSHARP_DIR }} ref: main - name: Setup .NET for FSharp - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: ${{ env.FSHARP_DIR }}/global.json - name: Restore tools