Skip to content

Commit

Permalink
Remove github job dotnet setup
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Dec 18, 2024
1 parent 8ad4106 commit b97ff0e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: ./Build/CI/install-env.sh
env:
ADDITIONAL_RUNTIME: 6.0.36
- run: ./Build/CI/tests.sh
env:
BUILD_ARGS: /p:AdditionalDefineConstants=SECP256K1_VERIFY
Expand All @@ -26,9 +26,9 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- run: ./Build/CI/install-env.sh
env:
ADDITIONAL_RUNTIME: 3.1.32
- run: ./Build/CI/tests.sh
env:
BUILD_ARGS: /p:AdditionalDefineConstants=SECP256K1_VERIFY
Expand All @@ -38,9 +38,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: ./Build/CI/install-env.sh
env:
ADDITIONAL_RUNTIME: 6.0.36
- run: ./Build/CI/tests.sh
env:
BUILD_ARGS: /p:TargetFrameworkOverride=netstandard2.0
Expand All @@ -50,9 +50,9 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: ./Build/CI/install-env.sh
env:
ADDITIONAL_RUNTIME: 6.0.36
- run: ./Build/CI/tests.sh
env:
Framework: net6.0
Expand All @@ -61,8 +61,6 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: ./Build/CI/install-env.sh
- run: dotnet clean -c Release ./NBitcoin.Tests/NBitcoin.Tests.csproj && dotnet nuget locals all --clear
- run: dotnet test -c Release -v n ./NBitcoin.Tests/NBitcoin.Tests.csproj --filter "RestClient=RestClient|RPCClient=RPCClient|Protocol=Protocol|Core=Core|UnitTest=UnitTest|Altcoins=Altcoins|PropertyTest=PropertyTest" -p:ParallelizeTestCollections=false -f net472
17 changes: 17 additions & 0 deletions Build/CI/install-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

sudo apt remove --purge dotnet*
sudo apt remove --purge aspnetcore*

rm -f /usr/bin/dotnet
sudo ln "$HOME/.dotnet/dotnet" /usr/bin/dotnet

wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh

# https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json
chmod +x ./dotnet-install.sh
./dotnet-install.sh --version 9.0.101 --channel LTS

[[ "${ADDITIONAL_RUNTIME:-}" ]] \
&& echo "Additional Runtime needed: $ADDITIONAL_RUNTIME" \
&& ./dotnet-install.sh --version "$ADDITIONAL_RUNTIME" --runtime dotnet --channel LTS
4 changes: 4 additions & 0 deletions Build/CI/tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash
set -e

export PATH="$PATH:$HOME/.dotnet"

: "${BUILD_ARGS:=}"

export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
dotnet --info
dotnet build ./NBitcoin.Tests/NBitcoin.Tests.csproj \
$BUILD_ARGS \
-c Release \
Expand Down

0 comments on commit b97ff0e

Please sign in to comment.