Skip to content

Release version 2.0.0 #159

Release version 2.0.0

Release version 2.0.0 #159

Workflow file for this run

name: CI
on:
push:
branches: [master, develop]
pull_request:
jobs:
test-net-core:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
dotnet: [
{ framework: net8.0, version: '8.0.x' },
{ framework: net10.0, version: '10.0.x' }
]
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK ${{ matrix.dotnet.version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Install dependencies
run: dotnet restore Secp256k1.Net.Test
- name: Build
run: dotnet build Secp256k1.Net.Test --configuration Release --framework ${{ matrix.dotnet.framework }} --no-restore
- name: Test
run: dotnet test Secp256k1.Net.Test --configuration Release --framework ${{ matrix.dotnet.framework }} --no-build --verbosity normal --blame-crash --logger "console;verbosity=detailed" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=./TestResults/
- name: Print test logs
if: failure()
shell: bash
run: |
echo "=== Test log files ==="
find . -name "*.log" -path "*/TestResults/*" -exec echo "--- {} ---" \; -exec cat {} \;
- name: List coverage files
if: always()
run: |
echo "Looking for coverage files:"
find . -name "*.cobertura.xml" -o -name "coverage*.xml" 2>/dev/null || echo "No coverage files found"
ls -la ./Secp256k1.Net.Test/TestResults/ 2>/dev/null || echo "No TestResults in test project"
shell: bash
continue-on-error: true
- name: Print crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: TestResultSequence-${{ matrix.os }}-${{ matrix.dotnet.framework }}
path: ./**/TestResults/*/Sequence_*.xml
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./Secp256k1.Net.Test/TestResults/coverage.${{ matrix.dotnet.framework }}.cobertura.xml
fail_ci_if_error: false
verbose: true
test-net-framework:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: dotnet restore Secp256k1.Net.Test
- name: Build
run: dotnet build Secp256k1.Net.Test --configuration Release --framework net462 --no-restore
- name: Test
run: dotnet vstest Secp256k1.Net.Test\bin\Release\net462\Secp256k1.Net.Test.exe /Framework:".NETFramework,Version=v4.6.2" /Platform:"${{ matrix.arch }}"
benchmark:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
dotnet: [
{ framework: net10.0, version: '10.0.x' }
]
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK ${{ matrix.dotnet.version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Install dependencies
run: dotnet restore Secp256k1.Net.Bench
- name: Build
run: dotnet build Secp256k1.Net.Bench --configuration Release --framework ${{ matrix.dotnet.framework }} --no-restore
- name: Run bench
run: dotnet run --project Secp256k1.Net.Bench --configuration Release --framework ${{ matrix.dotnet.framework }} --no-build
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: benchmarks-${{ matrix.os }}-${{ matrix.dotnet.framework }}-report
path: BenchmarkDotNet.Artifacts/results/*
# NativeLibTest - Tests native library loading in various deployment scenarios
platform-test-linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run portable tests
run: ./test/NativeLibTest/test-linux-portable.sh linux-x64
- name: Run RID-specific tests
run: ./test/NativeLibTest/test-linux-rid.sh linux-x64
- name: Run AOT tests
run: ./test/NativeLibTest/test-linux-aot.sh linux-x64
platform-test-linux-musl-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run portable tests
run: ./test/NativeLibTest/test-linux-portable.sh linux-musl-x64
- name: Run RID-specific tests
run: ./test/NativeLibTest/test-linux-rid.sh linux-musl-x64
- name: Run AOT tests
run: ./test/NativeLibTest/test-linux-aot.sh linux-musl-x64
platform-test-linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run portable tests
run: ./test/NativeLibTest/test-linux-portable.sh linux-arm64
- name: Run RID-specific tests
run: ./test/NativeLibTest/test-linux-rid.sh linux-arm64
- name: Run AOT tests
run: ./test/NativeLibTest/test-linux-aot.sh linux-arm64
platform-test-linux-musl-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run portable tests
run: ./test/NativeLibTest/test-linux-portable.sh linux-musl-arm64
- name: Run RID-specific tests
run: ./test/NativeLibTest/test-linux-rid.sh linux-musl-arm64
- name: Run AOT tests
run: ./test/NativeLibTest/test-linux-aot.sh linux-musl-arm64
platform-test-macos-x64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run macOS tests
run: ./test/NativeLibTest/test-macos.sh all
platform-test-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run macOS tests
run: ./test/NativeLibTest/test-macos.sh all
platform-test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run Windows tests
run: ./test/NativeLibTest/test-windows.ps1 -BuildMode all
# NativeLibTestLegacy - Tests .NET Framework 4.6.2 compatibility
platform-test-legacy-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run legacy .NET Framework tests (64-bit)
run: ./test/NativeLibTestLegacy/test-windows.ps1 -Arch x64
platform-test-legacy-windows-x86:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run legacy .NET Framework tests (32-bit)
run: ./test/NativeLibTestLegacy/test-windows.ps1 -Arch x86
platform-test-legacy-mono-linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Mono
run: |
sudo apt-get update
sudo apt-get install -y mono-complete
- name: Run Mono tests
run: ./test/NativeLibTestLegacy/test-mono.sh
platform-test-legacy-mono-linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Mono
run: |
sudo apt-get update
sudo apt-get install -y mono-complete
- name: Run Mono tests
run: ./test/NativeLibTestLegacy/test-mono.sh
platform-test-legacy-mono-linux-x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Build package and legacy test
run: |
dotnet pack Secp256k1.Net -c Release -o pkg -p:Version=0.0.1-localtest.1
dotnet build test/NativeLibTestLegacy -c Release
- name: Run Mono tests in 32-bit container
run: |
docker run --rm --platform linux/386 \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
mono:latest \
mono test/NativeLibTestLegacy/bin/Release/net462/NativeLibTestLegacy.exe
platform-test-legacy-mono-macos-x64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Mono
run: brew install mono
- name: Run Mono tests
run: ./test/NativeLibTestLegacy/test-mono.sh