Skip to content

Commit

Permalink
apacheGH-33783: [C#] Update release verification to use .NET 7.0 (apa…
Browse files Browse the repository at this point in the history
…che#33799)

Update verification script to download and install 7.0 but run tests against 6.0 if the 6.0 SDK is present.  Update examples to use 7.0 only.
* Closes: apache#33783

Authored-by: Weston Pace <[email protected]>
Signed-off-by: Weston Pace <[email protected]>
  • Loading branch information
westonpace authored Feb 6, 2023
1 parent 6294a73 commit f6bb03e
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 30 deletions.
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: ['6.0.x']
dotnet: ['7.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v2
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet: ['6.0.x']
dotnet: ['7.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v2
Expand All @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet: ['6.0.x']
dotnet: ['7.0.x']
steps:
- name: Install C#
uses: actions/setup-dotnet@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
dotnet-version: '7.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 @@ -53,7 +53,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 6.0 -InstallDir /opt/dotnet
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 7.0 -InstallDir /opt/dotnet

ENV ARROW_BUILD_INTEGRATION=ON \
ARROW_BUILD_STATIC=OFF \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/ubuntu-20.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=6.0
ARG dotnet=7.0
ARG platform=focal
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>net6.0</TargetFramework>
<TargetFramework>net7.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>net6.0</TargetFramework>
<TargetFramework>net7.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>net6.0</TargetFramework>
<TargetFramework>net7.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>net6.0</TargetFramework>
<TargetFramework>net7.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.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0</TargetFrameworks>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion dev/archery/archery/integration/tester_csharp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
_EXE_PATH = os.path.join(
ARROW_ROOT_DEFAULT,
"csharp/artifacts/Apache.Arrow.IntegrationTest",
"Debug/net6.0/Apache.Arrow.IntegrationTest",
"Debug/net7.0/Apache.Arrow.IntegrationTest",
)


Expand Down
28 changes: 15 additions & 13 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,15 @@ install_csharp() {

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

if which dotnet > /dev/null 2>&1; then
if dotnet --version | grep 7\.0 > /dev/null 2>&1; then
local csharp_bin=$(dirname $(which dotnet))
if ! which sourcelink > /dev/null 2>&1; then
local dotnet_tools_dir=$HOME/.dotnet/tools
if [ -d "${dotnet_tools_dir}" ]; then
PATH="${dotnet_tools_dir}:$PATH"
fi
fi
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=6.0.202
local dotnet_version=7.0.102
local dotnet_platform=
case "$(uname)" in
Linux)
Expand All @@ -382,10 +379,11 @@ install_csharp() {
fi

# Ensure to have sourcelink installed
if ! which sourcelink > /dev/null 2>&1; then
dotnet tool install --tool-path ${csharp_bin} sourcelink
if ! dotnet tool list | grep sourcelink > /dev/null 2>&1; then
dotnet new tool-manifest
dotnet tool install --local sourcelink
PATH=${csharp_bin}:${PATH}
if ! sourcelink --help > /dev/null 2>&1; then
if ! dotnet tool run sourcelink --help > /dev/null 2>&1; then
export DOTNET_ROOT=${csharp_bin}
fi
fi
Expand Down Expand Up @@ -835,8 +833,12 @@ test_csharp() {
mv ../.git dummy.git
fi

sourcelink test artifacts/Apache.Arrow/Release/netstandard1.3/Apache.Arrow.pdb
sourcelink test artifacts/Apache.Arrow/Release/netcoreapp3.1/Apache.Arrow.pdb
if [ "${SOURCE_KIND}" = "local" ]; then
echo "Skipping sourelink verification on local build"
else
dotnet tool run sourcelink test artifacts/Apache.Arrow/Release/netstandard1.3/Apache.Arrow.pdb
dotnet tool run sourcelink test artifacts/Apache.Arrow/Release/netcoreapp3.1/Apache.Arrow.pdb
fi

popd
}
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/verify-rc/github.macos.amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

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

- uses: actions/setup-node@v2-beta
with:
Expand Down

0 comments on commit f6bb03e

Please sign in to comment.