Skip to content

switch to dotnet cli #14

switch to dotnet cli

switch to dotnet cli #14

Workflow file for this run

name: Test NuGet
on:
push:
branches:
- master
paths:
- .github/workflows/test-nuget.yml
- src/**
workflow_dispatch:
env:
NUGET_REGISTRY: https://proget.starworks.cc:88/nuget/test/v3/index.json
GMP_NUGET_VERSION: 6.3.0-preview.1
MPFR_NUGET_VERSION: 4.2.1-preview.2
jobs:
test:
strategy:
matrix:
include:
- { os: win, arch: x64 }
- { os: win, arch: x86 }
- { os: linux, arch: x64 }
runs-on: ${{ matrix.os == 'win' && 'windows-latest' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- name: Configure NuGet Source
run: dotnet nuget add source --name StarWorks --source "${{ env.NUGET_REGISTRY }}"
- name: Download GMP Native NuGet
run: |
cd src/Sdcb.Arithmetic.Gmp.Tests
dotnet add package Sdcb.Arithmetic.Gmp.runtime.${{ matrix.os }}-${{ matrix.arch }} -v ${{ env.GMP_NUGET_VERSION }} --no-restore
cat Sdcb.Arithmetic.Gmp.Tests.csproj
- name: Download MPFR Native NuGet
run: |
cd src/Sdcb.Arithmetic.Mpfr.Tests
dotnet add package Sdcb.Arithmetic.Gmp.runtime.${{ matrix.os }}-${{ matrix.arch }} -v ${{ env.GMP_NUGET_VERSION }} --no-restore
cat Sdcb.Arithmetic.Mpfr.Tests.csproj
- name: DotNet Build
run: |
dotnet build -c Release --runtime ${{ matrix.os }}-${{ matrix.arch }}
- name: Test GMP
run: |
cd src/Sdcb.Arithmetic.Gmp.Tests
dotnet test -c Release --no-build --runtime ${{ matrix.os }}-${{ matrix.arch }}
- name: Test MPFR
run: |
cd src/Sdcb.Arithmetic.Mpfr.Tests
dotnet test -c Release --no-build --runtime ${{ matrix.os }}-${{ matrix.arch }}