Skip to content

Commit

Permalink
Merge pull request #978 from nojaf/fix-docs
Browse files Browse the repository at this point in the history
Update PR action
  • Loading branch information
dsyme authored Sep 6, 2023
2 parents 7b21cb6 + c07b50e commit a261178
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fsdocs-tool": {
"version": "17.0.0",
"version": "19.0.0",
"commands": [
"fsdocs"
]
Expand Down
45 changes: 29 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,41 @@ on:
branches:
- '**'

env:
FSHARP_DIR: fsharp

jobs:
build:

strategy:
matrix:
os: [windows-latest]
os: [ubuntu-latest]
dotnet: [6.0.400]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.100
- name: Restore tools
run: dotnet tool restore
- name: Restore projects
run: dotnet restore FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
- name: Checkout fsharp master
run: git clone https://github.com/dotnet/fsharp --depth 1 fsharp -b main
- name: Build fsharp master (turn of CI build status)
run: cd fsharp && eng\CIBuild.cmd -noVisualStudio
- name: Run fsdocs
run: dotnet fsdocs build --sourcefolder fsharp --input fsharp/docs
- uses: actions/checkout@v3
- name: Checkout fsharp main
uses: actions/checkout@v3
with:
repository: dotnet/fsharp
path: ${{ env.FSHARP_DIR }}
ref: main
- name: Setup .NET for FSharp
uses: actions/setup-dotnet@v3
with:
global-json-file: ${{ env.FSHARP_DIR }}/global.json
- name: Restore tools
run: dotnet tool restore

- name: Build FCS
run: dotnet build src/Compiler/FSharp.Compiler.Service.fsproj /p:BUILDING_USING_DOTNET=true
working-directory: ${{ env.FSHARP_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 fsdocs build --sourcefolder fsharp --input fsharp/docs
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ FSharp.Formatting/
.fsdocs/
FSharp.Compiler.Service/obj/
tmp/

output/

0 comments on commit a261178

Please sign in to comment.