on: 
  pull_request:
    paths:
      - .github/actions/extism/**
      - .github/workflows/ci-dotnet.yml
      - manifest/**
      - runtime/**
      - libextism/**
      - dotnet/**
  workflow_dispatch:

name: .NET CI

jobs:
  dotnet:
    name: .NET
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        rust:
          - stable
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
      - uses: ./.github/actions/extism
      - name: Setup .NET Core SDK
        uses: actions/setup-dotnet@v3.0.3
        with:
           dotnet-version: 7.x
      - name: Test .NET Sdk
        run: |
          cd dotnet
          LD_LIBRARY_PATH=/usr/local/lib dotnet test ./Extism.sln
