| @@ -0,0 +1,87 @@ | |||
| # This workflow will build a .NET project | |||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |||
| name: .NET | |||
| on: | |||
| push: | |||
| branches: [ "master" ] | |||
| pull_request: | |||
| branches: [ "master" ] | |||
| jobs: | |||
| build-and-test-on-windows-cpu: | |||
| runs-on: windows-latest | |||
| steps: | |||
| - uses: actions/checkout@v3 | |||
| - name: Setup .NET | |||
| uses: actions/setup-dotnet@v3 | |||
| with: | |||
| dotnet-version: 6.0.x | |||
| - name: Restore dependencies | |||
| run: dotnet restore | |||
| - name: Build | |||
| run: dotnet build --no-restore | |||
| - name: Test | |||
| run: dotnet test --no-build --verbosity normal | |||
| build-and-test-on-windows-gpu: | |||
| runs-on: windows-latest | |||
| steps: | |||
| - uses: actions/checkout@v3 | |||
| - name: Setup .NET | |||
| uses: actions/setup-dotnet@v3 | |||
| with: | |||
| dotnet-version: 6.0.x | |||
| - name: Restore dependencies | |||
| run: dotnet restore | |||
| - name: uninstall redist cpu on binding test | |||
| run: dotnet remove Tensorflow.UnitTest.RedistHolder package SciSharp.TensorFlow.Redist | |||
| - name: install redist gpu on keras test | |||
| run: dotnet add Tensorflow.UnitTest.RedistHolder package SciSharp.TensorFlow.Redist-Windows-GPU | |||
| - name: Build | |||
| run: dotnet build --no-restore | |||
| - name: Test | |||
| run: dotnet test --no-build --verbosity normal | |||
| build-and-test-on-linux-cpu: | |||
| runs-on: ubuntu-latest | |||
| steps: | |||
| - uses: actions/checkout@v3 | |||
| - name: Setup .NET | |||
| uses: actions/setup-dotnet@v3 | |||
| with: | |||
| dotnet-version: 6.0.x | |||
| - name: Restore dependencies | |||
| run: dotnet restore | |||
| - name: Build | |||
| run: dotnet build --no-restore | |||
| - name: Test | |||
| run: dotnet test --no-build --verbosity normal | |||
| build-and-test-on-linux-gpu: | |||
| runs-on: ubuntu-latest | |||
| steps: | |||
| - uses: actions/checkout@v3 | |||
| - name: Setup .NET | |||
| uses: actions/setup-dotnet@v3 | |||
| with: | |||
| dotnet-version: 6.0.x | |||
| - name: Restore dependencies | |||
| run: dotnet restore | |||
| - name: uninstall redist cpu on binding test | |||
| run: dotnet remove Tensorflow.UnitTest.RedistHolder package SciSharp.TensorFlow.Redist | |||
| - name: install redist gpu on keras test | |||
| run: dotnet add Tensorflow.UnitTest.RedistHolder package SciSharp.TensorFlow.Redist-Linux-GPU | |||
| - name: Build | |||
| run: dotnet build --no-restore | |||
| - name: Test | |||
| run: dotnet test --no-build --verbosity normal | |||