Skip to content

Commit a261178

Browse files
authored
Merge pull request #978 from nojaf/fix-docs
Update PR action
2 parents 7b21cb6 + c07b50e commit a261178

3 files changed

Lines changed: 31 additions & 18 deletions

File tree

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"fsdocs-tool": {
6-
"version": "17.0.0",
6+
"version": "19.0.0",
77
"commands": [
88
"fsdocs"
99
]

.github/workflows/pr.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,41 @@ on:
55
branches:
66
- '**'
77

8+
env:
9+
FSHARP_DIR: fsharp
10+
811
jobs:
912
build:
1013

1114
strategy:
1215
matrix:
13-
os: [windows-latest]
16+
os: [ubuntu-latest]
1417
dotnet: [6.0.400]
1518
runs-on: ${{ matrix.os }}
1619

1720
steps:
18-
- uses: actions/checkout@v3
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v3
21-
with:
22-
dotnet-version: 7.0.100
23-
- name: Restore tools
24-
run: dotnet tool restore
25-
- name: Restore projects
26-
run: dotnet restore FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
27-
- name: Checkout fsharp master
28-
run: git clone https://github.com/dotnet/fsharp --depth 1 fsharp -b main
29-
- name: Build fsharp master (turn of CI build status)
30-
run: cd fsharp && eng\CIBuild.cmd -noVisualStudio
31-
- name: Run fsdocs
32-
run: dotnet fsdocs build --sourcefolder fsharp --input fsharp/docs
21+
- uses: actions/checkout@v3
22+
- name: Checkout fsharp main
23+
uses: actions/checkout@v3
24+
with:
25+
repository: dotnet/fsharp
26+
path: ${{ env.FSHARP_DIR }}
27+
ref: main
28+
- name: Setup .NET for FSharp
29+
uses: actions/setup-dotnet@v3
30+
with:
31+
global-json-file: ${{ env.FSHARP_DIR }}/global.json
32+
- name: Restore tools
33+
run: dotnet tool restore
34+
35+
- name: Build FCS
36+
run: dotnet build src/Compiler/FSharp.Compiler.Service.fsproj /p:BUILDING_USING_DOTNET=true
37+
working-directory: ${{ env.FSHARP_DIR }}
38+
39+
- name: Run fsdocs
40+
env:
41+
# allow roll forward to latest major version - this would happen for us if we invoked the fsdocs tool instead of invoking the binary directly
42+
DOTNET_ROLL_FORWARD: "LatestMajor"
43+
# need previews because .NET 8 is what's being used at runtime
44+
DOTNET_ROLL_FORWARD_TO_PRERELEASE: "1"
45+
run: dotnet fsdocs build --sourcefolder fsharp --input fsharp/docs

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ FSharp.Formatting/
99
.fsdocs/
1010
FSharp.Compiler.Service/obj/
1111
tmp/
12-
12+
output/

0 commit comments

Comments
 (0)