Add Macro benchmark #203
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
env: | |
PROJECT_NAME: Mediapipe.Net | |
TEST_PROJECT_NAME: Mediapipe.Net.Tests | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- { name: Windows, runner: windows-latest, runtime: win-x64 } | |
# - { name: MacOS, runner: macos-latest, runtime: osx-x64 } | |
- { name: Linux, runner: ubuntu-latest, runtime: linux-x64 } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET 6 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build MediaPipe.NET | |
run: dotnet build -c Debug ${{ env.PROJECT_NAME }} -r ${{ matrix.os.runtime }} --self-contained | |
# Ignore SignalAbort tests on Windows | |
- name: Test MediaPipe.NET (Windows) | |
if: ${{ matrix.os.name == 'Windows' }} | |
run: dotnet test -c Debug ${{ env.TEST_PROJECT_NAME }} -r ${{ matrix.os.runtime }} --filter "TestCategory!=GpuOnly&TestCategory!=SignalAbort" --logger "trx;LogFileName=TestResults-${{ matrix.os.name }}.trx" | |
- name: Test MediaPipe.NET (*nix) | |
if: ${{ matrix.os.name != 'Windows' }} | |
run: dotnet test -c Debug ${{ env.TEST_PROJECT_NAME }} -r ${{ matrix.os.runtime }} --filter "TestCategory!=GpuOnly" --logger "trx;LogFileName=TestResults-${{ matrix.os.name }}.trx" | |
- name: Upload test artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: TestResults-${{ matrix.os.name }} | |
path: ${{ env.TEST_PROJECT_NAME }}/TestResults/*.trx |