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

.NET 8 hosting #767

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"
- name: Run Mongo container
run: docker run -p 27017:27017 -d dolittle/mongodb:4.2.2
- name: Run Benchmarks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"
- name: Run Mongo container
run: docker run -p 27017:27017 -d dolittle/mongodb:4.2.2
- name: Test
run: dotnet test --filter Tag=IntegrationTest --configuration Release
run: dotnet test --filter Tag=IntegrationTest -f net8.0 --configuration Release
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"
- name: Run Mongo container
run: docker run -p 27017:27017 -d dolittle/mongodb:4.2.2
- name: Run Benchmarks
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"
- name: Update VersionInfo
uses: dolittle/update-version-info-action@v1
with:
Expand All @@ -204,7 +204,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/osx-x64/publish/Dolittle.Runtime.CLI
asset_path: ./Source/CLI/bin/Release/net8.0/osx-x64/publish/Dolittle.Runtime.CLI
asset_name: dolittle-macos-x64
asset_content_type: application/octet-stream
- name: Publish for macOS arm64
Expand All @@ -216,7 +216,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/osx.11.0-arm64/publish/Dolittle.Runtime.CLI
asset_path: ./Source/CLI/bin/Release/net8.0/osx.11.0-arm64/publish/Dolittle.Runtime.CLI
asset_name: dolittle-macos-arm64
asset_content_type: application/octet-stream
- name: Publish for Windows x64
Expand All @@ -228,7 +228,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/win-x64/publish/Dolittle.Runtime.CLI.exe
asset_path: ./Source/CLI/bin/Release/net8.0/win-x64/publish/Dolittle.Runtime.CLI.exe
asset_name: dolittle-win-x64.exe
asset_content_type: application/octet-stream
- name: Publish for Windows x86
Expand All @@ -240,7 +240,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/win-x86/publish/Dolittle.Runtime.CLI.exe
asset_path: ./Source/CLI/bin/Release/net8.0/win-x86/publish/Dolittle.Runtime.CLI.exe
asset_name: dolittle-win-x86.exe
asset_content_type: application/octet-stream
- name: Publish for Windows arm64
Expand All @@ -252,7 +252,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/win-arm64/publish/Dolittle.Runtime.CLI.exe
asset_path: ./Source/CLI/bin/Release/net8.0/win-arm64/publish/Dolittle.Runtime.CLI.exe
asset_name: dolittle-win-arm64.exe
asset_content_type: application/octet-stream
- name: Publish for Windows arm
Expand All @@ -264,7 +264,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/win-arm/publish/Dolittle.Runtime.CLI.exe
asset_path: ./Source/CLI/bin/Release/net8.0/win-arm/publish/Dolittle.Runtime.CLI.exe
asset_name: dolittle-win-arm.exe
asset_content_type: application/octet-stream
- name: Publish for Linux x64
Expand All @@ -276,7 +276,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/linux-x64/publish/Dolittle.Runtime.CLI
asset_path: ./Source/CLI/bin/Release/net8.0/linux-x64/publish/Dolittle.Runtime.CLI
asset_name: dolittle-linux-x64
asset_content_type: application/octet-stream
- name: Publish for Linux arm64
Expand All @@ -288,7 +288,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/linux-arm64/publish/Dolittle.Runtime.CLI
asset_path: ./Source/CLI/bin/Release/net8.0/linux-arm64/publish/Dolittle.Runtime.CLI
asset_name: dolittle-linux-arm64
asset_content_type: application/octet-stream
- name: Publish for Linux arm
Expand All @@ -300,6 +300,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release-upload-url }}
asset_path: ./Source/CLI/bin/Release/net7.0/linux-arm/publish/Dolittle.Runtime.CLI
asset_path: ./Source/CLI/bin/Release/net8.0/linux-arm/publish/Dolittle.Runtime.CLI
asset_name: dolittle-linux-arm
asset_content_type: application/octet-stream
6 changes: 3 additions & 3 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
dotnet-version: "8.0.x"
- name: Build
run: dotnet build --configuration Release
run: dotnet build --configuration Release -f net8.0
- name: Test
run: dotnet test --filter Tag!=IntegrationTest --no-build --configuration Release --collect:"XPlat Code Coverage"
run: dotnet test --filter Tag!=IntegrationTest --no-build -f net8.0 --configuration Release --collect:"XPlat Code Coverage"

build-prod-docker-image:
name: Build Production Docker Image
Expand Down
4 changes: 2 additions & 2 deletions Docker/Development/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DotNet Build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS dotnet-build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS dotnet-build
SHELL ["/bin/bash", "-c"]
ARG VERSION
ARG TARGETARCH
Expand All @@ -12,7 +12,7 @@ COPY Specifications /app/Specifications/

WORKDIR /app/Source/Server
RUN dotnet restore
RUN dotnet publish -c "Release" -p:Version=${VERSION} -p:RuntimeIdentifier="linux-${TARGETARCH/amd64/x64}" -o out
RUN dotnet publish -c "Release" -p:Version=${VERSION} -f net7.0 -p:RuntimeIdentifier="linux-${TARGETARCH/amd64/x64}" -o out

# Runtime Image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
Expand Down
6 changes: 3 additions & 3 deletions Docker/Production/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DotNet Build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS dotnet-build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS dotnet-build
SHELL ["/bin/bash", "-c"]
ARG VERSION
ARG TARGETARCH
Expand All @@ -12,10 +12,10 @@ COPY Specifications /app/Specifications/

WORKDIR /app/Source/Server
RUN dotnet restore
RUN dotnet publish -c "Release" -p:Version=${VERSION} -p:RuntimeIdentifier="linux-${TARGETARCH/amd64/x64}" -o out
RUN dotnet publish -c "Release" -p:Version=${VERSION} -f net8.0 -p:RuntimeIdentifier="linux-${TARGETARCH/amd64/x64}" -o out

# Runtime Image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
SHELL ["/bin/bash", "-c"]

ENV Logging__Console__FormatterName=""
Expand Down
2 changes: 1 addition & 1 deletion Source/CLI/CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>Dolittle.Runtime.CLI</AssemblyName>
<RootNamespace>Dolittle.Runtime.CLI</RootNamespace>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<PackAsTool>true</PackAsTool>
<ToolCommandName>dolittle</ToolCommandName>
Expand Down
4 changes: 2 additions & 2 deletions Source/Events.Store.MongoDB/Development/MongoDB/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM mongo:4.2.2-bionic
FROM mongo:7.0

COPY replicaset-initiate.js /docker-entrypoint-initdb.d/

CMD ["mongod", "--replSet", "rs0"]
CMD ["mongod", "--replSet", "rs0"]
2 changes: 1 addition & 1 deletion default.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="versions.props"/>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<NoWarn>$(NoWarn);SYSLIB1002;SYSLIB1006;SYSLIB1007</NoWarn>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion specs.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="versions.props"/>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<NoWarn>IDE1006;IDE0044;IDE0051;IDE0052;CA2211;CS0612;CS0169;CS8981;RCS1169;RCS1018;RCS1213</NoWarn>
</PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<Import Project="versions.props"/>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsTestProject>true</IsTestProject>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Loading