Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net9 version #1315

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
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": {
"paket": {
"version": "8.0.3",
"version": "8.1.0-alpha004",
"commands": [
"paket"
],
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-and-pack-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- nightly

env:
BuildNet7: true

jobs:
pack-nightly:
runs-on: ubuntu-latest
Expand All @@ -29,7 +26,5 @@ jobs:
run: dotnet pack -c Release -o bin
env:
VersionSuffix: "beta${{ steps.date.outputs.date }}"
BuildNet7: ${{ env.BuildNet7 }}

- name: Push packages
run: dotnet nuget push bin/fsautocomplete.*.nupkg --source https://nuget.pkg.github.com/fsharp/index.json --api-key ${{ secrets.GITHUB_TOKEN }}
132 changes: 54 additions & 78 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,116 +15,92 @@ on:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# let's make sure we're on the version we think we are.
- name: Announce .NET version
run: dotnet --info

# only need global.json from code to build
- name: Setup .NET
uses: actions/setup-dotnet@v4

- name: Restore tools
run: dotnet tool restore

- name: Check format
run: dotnet fantomas --check build.fsx src
env:
DOTNET_ROLL_FORWARD: LatestMajor
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1

- name: Run Build
run: dotnet build -c Release

- uses: actions/upload-artifact@v4
with:
name: compiled-tests
path: test/FsAutoComplete.Tests.Lsp/bin/Release


test:
name: Test app on ${{ matrix.test_os }} with .NET ${{ matrix.dotnet_versions }}(Transparent=${{ matrix.use-transparent-compiler }}, Loader=${{ matrix.workspace-loader }})
env:
TEST_TIMEOUT_MINUTES: 40
FSAC_TEST_DEFAULT_TIMEOUT : 120000 #ms, individual test timeouts
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 # needed to allow .NET 8 RCs to participate in rollforward as expected.
timeout-minutes: 40 # we have a locking issue, so cap the runs at ~20m to account for varying build times, etc
strategy:
matrix:
os:
test_os:
- windows-latest
- macos-13 # using 13 because it's a bigger machine, and latest is still pointing to 12
- ubuntu-latest
dotnet-version: ["", "6.0.x", "7.0.x", "8.0.x"]
use-transparent-compiler:
- "TransparentCompiler"
- "BackgroundCompiler"
workspace-loader:
- "WorkspaceLoader"
# - "ProjectGraph" # this is disable because it just adds too much time to the build
# these entries will mesh with the above combinations
include:
# just use what's in the repo
- global-json-file: "global.json"
dotnet-version: ""
include-prerelease: false
label: "repo global.json"
build_net7: false
test_tfm: net6.0
# latest 6.0
- global-json-file: "global.json"
dotnet-version: "6.0.x"
include-prerelease: false
label: "6.0"
build_net7: false
test_tfm: net6.0
# latest 7.0
- global-json-file: "global.json"
dotnet-version: "7.0.x"
include-prerelease: true
label: "7.0"
build_net7: true
test_tfm: net7.0
# latest 8.0
- global-json-file: "global.json"
dotnet-version: "8.0.x"
include-prerelease: true
label: "8.0"
build_net8: true
test_tfm: net8.0
dotnet_versions:
- '6.0'
- '8.0'
- '9.0'
fail-fast: false # we have timing issues on some OS, so we want them all to run

runs-on: ${{ matrix.os }}

name: Build on ${{matrix.os}} for ${{ matrix.label }} ${{ matrix.workspace-loader }} ${{ matrix.use-transparent-compiler }}

needs: build
runs-on: ${{ matrix.test_os }}
steps:
- uses: actions/checkout@v3

# setup .NET per the repo global.json
- name: Setup .NET
uses: actions/setup-dotnet@v3

# setup .NET per test session
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
include-prerelease: ${{ matrix.include-prerelease }}
global-json-file: ${{ matrix.global-json-file }}
dotnet-version: ${{ matrix.dotnet-version }}
dotnet-version: |
6.0
8.0
9.0
# remove global.json so that the env configuration takes precedence
- name: Purge global.json
run: rm global.json
- name: Download code
uses: actions/checkout@v4

# let's make sure we're on the version we think we are.
- name: Announce .NET version
run: dotnet --info

- name: Restore tools
run: dotnet tool restore

- name: Check format
run: dotnet fantomas --check build.fsx src
env:
DOTNET_ROLL_FORWARD: LatestMajor
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1

# Ensure the scaffolding code can still add items to the existing code.
# - name: EnsureCanScaffoldCodeFix
# run: dotnet fsi build.fsx -- -p EnsureCanScaffoldCodeFix

- name: Run Build
run: dotnet build -c Release
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}
- name: Copy compiled tests
uses: actions/download-artifact@v4
with:
name: compiled-tests
path: ./test/FsAutoComplete.Tests.Lsp/bin/Release

- name: Run and report tests
run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --logger "console;verbosity=normal" --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true --blame-hang --blame-hang-timeout 1m
run: dotnet test bin/Release/net${{ matrix.dotnet_versions }}/FsAutoComplete.Tests.Lsp.dll --logger "console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --logger GitHubActions -- Expecto.fail-on-focused-tests=true
working-directory: test/FsAutoComplete.Tests.Lsp
env:
BuildNet7: ${{ matrix.build_net7 }}
BuildNet8: ${{ matrix.build_net8 }}
USE_TRANSPARENT_COMPILER: ${{ matrix.use-transparent-compiler }}
USE_WORKSPACE_LOADER: ${{ matrix.workspace-loader }}

analyze:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="SourceTextBenchmarks.fs" />
Expand Down
5 changes: 2 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"rollForward": "latestMajor",
"version": "9.0.100-preview.6.24328.19",
"allowPrerelease": true
}
}
}
8 changes: 4 additions & 4 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version 7.2.1

framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0
framework: netstandard2.0, netstandard2.1, net6.0, net8.0, net9.0

source https://api.nuget.org/v3/index.json
# this is the FCS nightly feed, re-enable at your own risk!
Expand Down Expand Up @@ -37,21 +37,21 @@ nuget Serilog.Sinks.Async >= 1.5
nuget Destructurama.FSharp
nuget FSharp.UMX >= 1.1
nuget FSharp.Formatting >= 14.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1 ,net6.0, net7.0, net8.0
nuget FsToolkit.ErrorHandling.TaskResult >= 4.4 framework: netstandard2.1, net6.0, net7.0, net8.0, net9.0
nuget IcedTasks >= 0.11.7
nuget FSharpx.Async >= 1.14
nuget CliWrap >= 3.0
nuget System.CommandLine prerelease
nuget FSharp.Data.Adaptive >= 1.2
nuget Microsoft.NET.Test.Sdk >= 17.4
nuget Microsoft.NET.Test.Sdk >= 17.10
nuget Dotnet.ReproducibleBuilds copy_local:true

nuget Microsoft.NETFramework.ReferenceAssemblies
nuget Ionide.KeepAChangelog.Tasks copy_local: true
nuget Expecto.Diff
nuget YoloDev.Expecto.TestSdk
nuget AltCover
nuget GitHubActionsTestLogger
nuget GitHubActionsTestLogger >= 2.4.1
nuget Ionide.LanguageServerProtocol 0.6.0
nuget Microsoft.Extensions.Caching.Memory
nuget OpenTelemetry.Api >= 1.3.2
Expand Down
Loading
Loading