Skip to content

Commit

Permalink
apacheGH-41375: [C#] Move to .NET 8.0 (apache#41376)
Browse files Browse the repository at this point in the history
### What changes are included in this PR?

Changes to workflow infrastructure and projects to install and target net8.0 instead of net7.0.

### Are these changes tested?

Yes

### Are there any user-facing changes?

Users will need to install .NET 8 to run tests and examples. No impact on product code.

Closes apache#41375
* GitHub Issue: apache#41375

Lead-authored-by: Curt Hagenlocher <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
  • Loading branch information
2 people authored and vibhatha committed May 25, 2024
1 parent 4525f6a commit 37e7272
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ UBUNTU=20.04
CLANG_TOOLS=14
CUDA=11.2.2
DASK=latest
DOTNET=7.0
DOTNET=8.0
GCC_VERSION=""
GO=1.21.8
STATICCHECK=v0.4.7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet: ['7.0.x']
dotnet: ['8.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet: ['7.0.x']
dotnet: ['8.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v4
Expand All @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet: ['7.0.x']
dotnet: ['8.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'
- name: Install Dependencies
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-integration.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN wget -nv -O - https://dl.google.com/go/go${go}.linux-${arch}.tar.gz | tar -x

ENV DOTNET_ROOT=/opt/dotnet \
PATH=/opt/dotnet:$PATH
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 7.0 -InstallDir /opt/dotnet
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 8.0 -InstallDir /opt/dotnet

ENV ARROW_ACERO=OFF \
ARROW_AZURE=OFF \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/ubuntu-22.04-csharp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

ARG arch=amd64
ARG dotnet=7.0
ARG dotnet=8.0
ARG platform=jammy
FROM mcr.microsoft.com/dotnet/sdk:${dotnet}-${platform}-${arch}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Required for PythonNET -->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<PropertyGroup Condition="'$(IsWindows)'=='true'">
<TargetFrameworks>net7.0;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net472;net462</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'!='true'">
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions dev/archery/archery/integration/tester_csharp.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

_EXE_PATH = os.path.join(_ARTIFACTS_PATH,
"Apache.Arrow.IntegrationTest",
"Debug/net7.0/Apache.Arrow.IntegrationTest",
"Debug/net8.0/Apache.Arrow.IntegrationTest",
)

_clr_loaded = False
Expand All @@ -44,10 +44,10 @@ def _load_clr():
import clr
clr.AddReference(
f"{_ARTIFACTS_PATH}/Apache.Arrow.IntegrationTest/"
f"Debug/net7.0/Apache.Arrow.IntegrationTest.dll")
f"Debug/net8.0/Apache.Arrow.IntegrationTest.dll")
clr.AddReference(
f"{_ARTIFACTS_PATH}/Apache.Arrow.Tests/"
f"Debug/net7.0/Apache.Arrow.Tests.dll")
f"Debug/net8.0/Apache.Arrow.Tests.dll")

from Apache.Arrow.IntegrationTest import CDataInterface
CDataInterface.Initialize()
Expand Down
4 changes: 2 additions & 2 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ install_csharp() {

show_info "Ensuring that C# is installed..."

if dotnet --version | grep 7\.0 > /dev/null 2>&1; then
if dotnet --version | grep 8\.0 > /dev/null 2>&1; then
local csharp_bin=$(dirname $(which dotnet))
show_info "Found C# at $(which csharp) (.NET $(dotnet --version))"
else
if which dotnet > /dev/null 2>&1; then
show_info "dotnet found but it is the wrong version and will be ignored."
fi
local csharp_bin=${ARROW_TMPDIR}/csharp/bin
local dotnet_version=7.0.102
local dotnet_version=8.0.204
local dotnet_platform=
case "$(uname)" in
Linux)
Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/verify-rc/github.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
distribution: 'temurin'
java-version: '11'

- uses: actions/setup-dotnet@v2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developers/release_verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ As an example:
* NVIDIA CUDA Build cuda_11.5.r11.5/compiler.30672275_0
* openjdk version "17.0.9" 2023-10-17
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
* dotnet 7.0.115
* dotnet 8.0.204
* Ubuntu 22.04 LTS
If there were some issues during verification please report them on the
Expand Down

0 comments on commit 37e7272

Please sign in to comment.