Skip to content

Commit

Permalink
attempt to test the nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Jul 27, 2023
1 parent 2e803c1 commit 81ee587
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
rustup target add ${{ matrix.target }}
cargo install cargo-lipo
- name: Install protobuf compiler
if: steps.check_artifact_exists.outputs.exists == 'false'
Expand All @@ -44,7 +45,7 @@ jobs:
- name: Build Breez
if: steps.check_artifact_exists.outputs.exists == 'false'
working-directory: libs/sdk-bindings
run: cargo build --release --target ${{ matrix.target }}
run: cargo lipo --release --targets ${{ matrix.target }}

- name: Archive release
if: steps.check_artifact_exists.outputs.exists == 'false'
Expand Down
33 changes: 32 additions & 1 deletion .github/workflows/publish-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,38 @@ jobs:
run: dotnet pack --configuration Release Breez.Sdk.csproj

- name: Archive the package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Breez.Sdk.${{ github.sha }}.nupkg
path: libs/sdk-bindings/bindings-csharp/bin/Release/Breez.Sdk.*.nupkg

test-package:
needs: build-package
runs-on: ${{ matrix.target }}
strategy:
matrix:
target: [
windows-latest,
ubuntu-latest,
macOS-latest,
]
steps:
- name: Checkout breez-sdk repo
uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: Breez.Sdk.${{ github.sha }}.nupkg
path: libs/sdk-bindings/bindings-csharp/bin/Release

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'

- name: test package
working-directory: libs/sdk-bindings/tests/bindings/csharp
run: dotnet run



12 changes: 8 additions & 4 deletions libs/sdk-bindings/tests/bindings/csharp/sdk-cs-demo.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\..\..\bindings-csharp\Breez.Sdk.csproj" />
</ItemGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>sdk_cs_demo</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<RestoreSources>$(RestoreSources);../../../bindings-csharp/bin/Release</RestoreSources>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Breez.Sdk" Version="*" />
</ItemGroup>
</Project>

0 comments on commit 81ee587

Please sign in to comment.