Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
397ab19
use direct function pointers in modern .net, add support for musl, fi…
zone117x Jan 18, 2026
9c784d4
run nativelib deployment tests in CI
zone117x Jan 18, 2026
40032b3
print failed test logs in CI
zone117x Jan 18, 2026
87f8dbe
fix unit tests
zone117x Jan 18, 2026
47f8d8e
more test fixes
zone117x Jan 18, 2026
0cd801e
test fixes
zone117x Jan 18, 2026
ec7d7c4
attempt fixing legacy windows net462
zone117x Jan 18, 2026
518de87
attempt fixing legacy windows net462
zone117x Jan 18, 2026
cfb43b0
attempt fixing legacy windows net462
zone117x Jan 18, 2026
c2d5748
attempt fixing legacy windows net462
zone117x Jan 18, 2026
9bad6a5
use source generator to define all the interop functions
zone117x Jan 19, 2026
c6bb5d8
fix tests
zone117x Jan 19, 2026
50959dd
improve code comments
zone117x Jan 19, 2026
4ca0ed2
tests for generated wrappers
zone117x Jan 19, 2026
1c6cbb4
replace more handwritten wrappers with generated wrappers
zone117x Jan 19, 2026
51d8ba7
replace more handwritten wrappers with generated
zone117x Jan 19, 2026
a8251cd
commit generated code
zone117x Jan 19, 2026
395303f
fix source generation race condition breaking builds
zone117x Jan 19, 2026
ea91c72
fix warnings for AOT builds
zone117x Jan 19, 2026
57c707a
add singlefile publish test
zone117x Jan 19, 2026
2ec3497
fix more build warnings
zone117x Jan 19, 2026
fbfd3a0
perform detection for C API arg sizes and optionality in the header p…
zone117x Jan 19, 2026
51a7d98
remove redundant array length args
zone117x Jan 19, 2026
a39cbac
generate enums for flags and fix code comment extraction for function…
zone117x Jan 19, 2026
6ef7240
output size validation for EcPubkeySerialize
zone117x Jan 19, 2026
1b75dde
reduce public API pollution
zone117x Jan 19, 2026
1a563f2
update benchmark 3rd party libraries, add more comparison functions
zone117x Jan 19, 2026
7500b35
generated wrapper code optimizations
zone117x Jan 19, 2026
d0f4760
benchmark tweaks
zone117x Jan 19, 2026
b6a5d10
update readme with latest benchmark results
zone117x Jan 19, 2026
48cfa1d
implement static methods that expose idiomatic C# methods for using t…
zone117x Jan 20, 2026
bb54717
add example usage project
zone117x Jan 20, 2026
a8d6ef7
Add test for linux-x84 (must use mono in 32-bit linux docker image)
zone117x Jan 20, 2026
d107dc4
attempt fix dlopen error on some platforms (e.g. 32-bit linux)
zone117x Jan 20, 2026
fe1269f
attempt fix dlopen error on some platforms (e.g. 32-bit linux)
zone117x Jan 20, 2026
b53f9de
update readme with latest example usage
zone117x Jan 20, 2026
a383ae4
add changelog and more usage examples
zone117x Jan 20, 2026
76a96fa
add reference doc generation
zone117x Jan 20, 2026
d845bc4
ci: docs
zone117x Jan 20, 2026
9aeacf4
add docs readme
zone117x Jan 20, 2026
be7167e
fix IsNormalizedSignature bug
zone117x Jan 20, 2026
637c898
update changelog
zone117x Jan 20, 2026
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
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy Documentation

on:
push:
branches: [master, develop]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build Project
run: dotnet build Secp256k1.Net/Secp256k1.Net.csproj -c Release

- name: Install DocFX
run: dotnet tool install -g docfx

- name: Build Documentation
run: |
cp README.md docs/index.md
docfx docs/docfx.json

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_site

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
188 changes: 187 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ jobs:
- 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 -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=./TestResults/
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: |
Expand Down Expand Up @@ -90,3 +96,183 @@ jobs:
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,9 @@ ASALocalRun/
# MFractors (Xamarin productivity tool) working folder
.mfractor/
coverage
CoverageReport

# DocFX
docs/_site/
docs/api/
docs/index.md
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "secp256k1"]
path = secp256k1
url = git@github.com:zone117x/secp256k1.git
branch = master
Loading