# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. name: Coyote CI on: push: branches: [ main ] paths-ignore: - 'docs/**' - '**.md' pull_request: branches: [ main ] paths-ignore: - 'docs/**' - '**.md' workflow_dispatch: branches: [ main ] jobs: build-and-test: name: Build and test Coyote strategy: matrix: platform: [ windows-latest, ubuntu-latest, macos-latest ] runs-on: ${{ matrix.platform }} env: COYOTE_CLI_TELEMETRY_OPTOUT: 1 steps: - uses: actions/checkout@v2 - name: Setup NuGet.exe uses: NuGet/setup-nuget@v1 with: nuget-version: '6.x' - name: Setup .NET 8.0 SDK uses: actions/setup-dotnet@v1 with: dotnet-version: '8.0.x' - name: Setup .NET 6.0 SDK uses: actions/setup-dotnet@v1 with: dotnet-version: '6.0.x' - name: Setup debugging tools if: ${{ matrix.platform == 'windows-latest' }} run: | Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile Procdump.zip 7z x .\Procdump.zip -oexternal && rm Procdump.zip echo "PROCDUMP_PATH=$pwd\external" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append shell: pwsh - name: Build Coyote projects run: ./Scripts/build.ps1 -ci -nuget shell: pwsh - name: Validate Coyote rewriting if: ${{ matrix.platform == 'windows-latest' }} run: ./Tests/compare-rewriting-diff-logs.ps1 shell: pwsh - name: Run Coyote tests run: ./Scripts/run-tests.ps1 -ci shell: pwsh - name: Archive Coyote binaries uses: actions/upload-artifact@v3 with: name: coyote-binaries path: ./bin - name: Archive test results if: failure() uses: actions/upload-artifact@v3 with: name: coyote-test-results path: ./Tests/**/TestResults build-and-test-samples: name: Build and test Coyote samples needs: build-and-test strategy: matrix: platform: [ windows-latest, ubuntu-latest, macos-latest ] runs-on: ${{ matrix.platform }} env: COYOTE_CLI_TELEMETRY_OPTOUT: 1 steps: - uses: actions/checkout@v2 - name: Setup .NET 8.0 SDK uses: actions/setup-dotnet@v1 with: dotnet-version: '8.0.x' - name: Download Coyote binaries uses: actions/download-artifact@v3 with: name: coyote-binaries path: ./bin - name: Build Coyote samples run: | ./Samples/Scripts/build.ps1 -local -nuget ./Samples/Scripts/build-tests.ps1 -local -nuget shell: pwsh - name: Test Coyote samples run: ./Samples/Scripts/run-tests.ps1 shell: pwsh