From ac849aca01241140d1e4fac9bb2ed02545735ecc Mon Sep 17 00:00:00 2001 From: Marius Thesing Date: Fri, 15 Nov 2024 19:11:37 +0100 Subject: [PATCH] temp --- .github/workflows/build.yml | 85 +++++++++---------------------------- 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ea4028c7..7ca3b33de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,65 +1,20 @@ -image: - - Ubuntu2204 - - Visual Studio 2022 - -services: - - docker - -for: -- - matrix: - only: - - image: Ubuntu2204 - - init: - - git config --global core.autocrlf input - - before_build: - - sh: mkdir artifacts -p - - build_script: - - echo build - - dotnet build -f net8.0 -c Debug test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj - - dotnet build -f net8.0 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj - - dotnet build -f net48 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj - - test_script: - - sh: echo "Run unit tests" - - sh: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger "console;verbosity=normal" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_unit_test_net_8_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj - - sh: echo "Run integration tests" - - sh: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger "console;verbosity=normal" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_integration_test_net_8_coverage.xml test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj - # Also run a subset of the integration tests targeting netfx using mono. This is a temporary measure to get - # some coverage until a proper solution for running the .NET Framework integration tests in CI is found. - # Running all the tests causes problems which are not worth solving in this rare configuration. - # See https://github.com/sshnet/SSH.NET/pull/1462 and related links - - sh: dotnet test -f net48 -c Debug --no-restore --no-build --results-directory artifacts --logger "console;verbosity=normal" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_integration_test_net_48_coverage.xml --filter "Name~Ecdh|Name~ECDsa|Name~Zlib|Name~Gcm" test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj - -- - matrix: - only: - - image: Visual Studio 2022 - - init: - - git config --global core.autocrlf true - - before_build: - - ps: mkdir artifacts -f - - build_script: - - echo build - - dotnet build Renci.SshNet.sln -c Debug - - dotnet publish -c Release -r win-x64 /warnaserror .\test\Renci.SshNet.AotCompatibilityTestApp\ - - dotnet pack -c Release - - test_script: - - ps: echo "Run unit tests for .NET 8.0" - - ps: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger "console;verbosity=normal" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/windows_unit_test_net_8_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj - - ps: echo "Run unit tests for .NET Framework 4.6.2" - - ps: dotnet test -f net462 -c Debug --no-restore --no-build --results-directory artifacts --logger "console;verbosity=normal" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/windows_unit_test_net_4_6_2_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj - -artifacts: - - path: artifacts - name: TestResults - - - path: src/**/*.nupkg - - path: src/**/*.snupkg +name: Build + +on: [ push ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Build + run: | + dotnet build -f net8.0 -c Debug test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj + dotnet build -f net8.0 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj + dotnet build -f net48 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj