Skip to content

Commit 8ff4a66

Browse files
authored
Update to SDK v8 (#107)
* Update to v8 SDK * Fix and update actions * Refactor test and prefer global.json for actions * Make test assetions Linux safe * Bump tool versions
1 parent e681f15 commit 8ff4a66

32 files changed

+207
-195
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,41 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
22+
- uses: actions/checkout@v4
2223
with:
2324
fetch-depth: 1
25+
2426
- run: |
2527
git fetch --prune --unshallow --tags
2628
echo exit code $?
2729
git tag --list
28-
- uses: actions/setup-dotnet@v1
30+
31+
- uses: actions/setup-dotnet@v4
2932
with:
30-
dotnet-version: |
31-
5.0.x
32-
6.0.x
33-
source-url: https://nuget.pkg.github.com/elastic/index.json
34-
env:
35-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
33+
global-json-file: ./global.json
3634

3735
- run: ./build.sh build -s true
3836
name: Build
37+
3938
- run: ./build.sh test -s true
4039
name: Test
40+
4141
- run: ./build.sh generatepackages -s true
4242
name: Generate local nuget packages
43+
4344
- run: ./build.sh validatepackages -s true
4445
name: "validate *.npkg files that were created"
46+
4547
- run: ./build.sh generateapichanges -s true
4648
name: "Inspect public API changes"
4749

4850
- name: publish canary packages github package repository
4951
if: github.event_name == 'push' && startswith(github.ref, 'refs/heads')
5052
shell: bash
5153
run: |
52-
until dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols; do echo "Retrying"; sleep 1; done;
54+
dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/elastic/index.json"
55+
until dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols --source "github"; do echo "Retrying"; sleep 1; done;
5356
5457
# Github packages requires authentication, this is likely going away in the future so for now we publish to feedz.io
5558
- run: dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.FEEDZ_IO_API_KEY}} -s https://f.feedz.io/elastic/all/nuget/index.json --skip-duplicate --no-symbols
@@ -59,6 +62,7 @@ jobs:
5962
- run: ./build.sh generatereleasenotes -s true
6063
name: Generate release notes for tag
6164
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
65+
6266
- run: ./build.sh createreleaseongithub -s true --token ${{secrets.GITHUB_TOKEN}}
6367
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
6468
name: Create or update release for tag on github

.github/workflows/test-windows.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020

2121
permissions:
2222
contents: read
23+
checks: write
2324

2425
concurrency:
2526
group: ${{ github.workflow }}-${{ github.ref }}
@@ -32,10 +33,10 @@ defaults:
3233
jobs:
3334
tests:
3435
runs-on: windows-2022
35-
36+
3637
steps:
3738
- name: Checkout
38-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
3940
with:
4041
fetch-depth: 1
4142

@@ -45,7 +46,7 @@ jobs:
4546
git tag --list
4647
name: Fetch Tags
4748
48-
- uses: actions/cache@v3
49+
- uses: actions/cache@v4
4950
name: NuGet package cache
5051
with:
5152
path: ~/.nuget/packages
@@ -54,10 +55,9 @@ jobs:
5455
${{ runner.os }}-nuget
5556
5657
- name: Setup dotnet
57-
uses: actions/setup-dotnet@v3
58+
uses: actions/setup-dotnet@v4
5859
with:
59-
dotnet-version: |
60-
6.0.x
60+
global-json-file: ./global.json
6161

6262
- run: ./build.bat build -s true
6363
name: Build
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Test Results
6969
if: success() || failure()
70-
uses: mikepenz/action-junit-report@v3
70+
uses: mikepenz/action-junit-report@v4
7171
with:
7272
report_paths: 'build/output/junit-*.xml'
7373
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ project.lock.json
7878
/src/.vs/restore.dg
7979
src/packages/
8080
BenchmarkDotNet.Artifacts
81+
*.received.*
8182

8283
/.ionide/symbolCache.db

Directory.Build.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<PackageReference Include="MinVer" Version="2.5.0" PrivateAssets="all" />
21-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.2" PrivateAssets="all"/>
21+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
22+
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
24+
</PackageReference>
2225
</ItemGroup>
2326
</Project>
File renamed without changes.
File renamed without changes.

Playground/Playground.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.9.2" />
11+
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.12.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>
1515
<ProjectReference Include="..\src\Elastic.Transport\Elastic.Transport.csproj" />
1616
</ItemGroup>
1717

18-
<ItemGroup>
19-
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" />
20-
</ItemGroup>
21-
2218
</Project>

benchmarks/Elastic.Transport.Benchmarks/Elastic.Transport.Benchmarks.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
6-
<TargetFramework>net6.0</TargetFramework>
7-
<LangVersion>9.0</LangVersion>
6+
<TargetFramework>net8.0</TargetFramework>
87
</PropertyGroup>
98

109
<ItemGroup>
@@ -16,8 +15,4 @@
1615
<ProjectReference Include="..\..\src\Elastic.Transport\Elastic.Transport.csproj" />
1716
</ItemGroup>
1817

19-
<ItemGroup>
20-
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" />
21-
</ItemGroup>
22-
2318
</Project>

benchmarks/Elastic.Transport.Profiling/Elastic.Transport.Profiling.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="JetBrains.Profiler.Api" Version="1.4.0" />
9+
<PackageReference Include="JetBrains.Profiler.Api" Version="1.4.2" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
1313
<ProjectReference Include="..\..\src\Elastic.Transport\Elastic.Transport.csproj" />
1414
</ItemGroup>
1515

16-
<ItemGroup>
17-
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" />
18-
</ItemGroup>
19-
2016
</Project>

build/scripts/CommandLine.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ with
2929
interface IArgParserTemplate with
3030
member this.Usage =
3131
match this with
32-
| Clean _ -> "clean known output locations"
33-
| Build _ -> "Run build"
34-
| Test _ -> "Runs build then tests"
35-
| Release _ -> "runs build, tests, and create and validates the packages shy of publishing them"
36-
| Publish _ -> "Runs the full release"
32+
| Clean -> "clean known output locations"
33+
| Build -> "Run build"
34+
| Test -> "Runs build then tests"
35+
| Release -> "runs build, tests, and create and validates the packages shy of publishing them"
36+
| Publish -> "Runs the full release"
3737

3838
| SingleTarget _ -> "Runs the provided sub command without running their dependencies"
3939
| Token _ -> "Token to be used to authenticate with github"

0 commit comments

Comments
 (0)