Skip to content

Commit

Permalink
Merge branch 'develop' into bad-samaritan/develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Renci.SshNet/AuthenticationMethod.cs
#	src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.cs
#	src/Renci.SshNet/NoneAuthenticationMethod.cs
#	src/Renci.SshNet/PasswordAuthenticationMethod.cs
#	src/Renci.SshNet/PrivateKeyAuthenticationMethod.cs
  • Loading branch information
Rob-Hague committed Jan 11, 2025
2 parents c34ad23 + 7e71bb4 commit 4dcd67e
Show file tree
Hide file tree
Showing 1,646 changed files with 103,063 additions and 89,935 deletions.
1,486 changes: 1,486 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* text=auto

*.cs text
*.cs text diff=csharp
*.xaml text
*.sln eol=crlf
*.csproj eol=crlf
Expand All @@ -15,3 +15,9 @@
*.nupkg binary
*.pdf binary
*.snk binary

# Ensure key files have LF endings for easier usage with ssh-keygen
# Also, the dockerfile used for integration tests fails if key files have cr-lf
test/Data/* eol=lf
test/Renci.SshNet.IntegrationTests/server/**/* eol=lf
test/Renci.SshNet.IntegrationTests/user/* eol=lf
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "docker"
directory: "/test/Renci.SshNet.IntegrationTests/"
schedule:
interval: "weekly"
165 changes: 165 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: Build

on:
- push
- pull_request
- workflow_dispatch

jobs:
Linux:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for Nerdbank.GitVersioning

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Build Unit Tests .NET
run: dotnet build -f net9.0 test/Renci.SshNet.Tests/

- name: Build IntegrationTests .NET
run: dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/

- name: Build IntegrationTests .NET Framework
run: dotnet build -f net48 test/Renci.SshNet.IntegrationTests/

- name: Run Unit Tests .NET
run: |
dotnet test \
-f net9.0 \
--no-build \
--logger "console;verbosity=normal" \
--logger GitHubActions \
-p:CollectCoverage=true \
-p:CoverletOutputFormat=cobertura \
-p:CoverletOutput=../../coverlet/linux_unit_test_net_9_coverage.xml \
test/Renci.SshNet.Tests/
- name: Run Integration Tests .NET
run: |
dotnet test \
-f net9.0 \
--no-build \
--logger "console;verbosity=normal" \
--logger GitHubActions \
-p:CollectCoverage=true \
-p:CoverletOutputFormat=cobertura \
-p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
test/Renci.SshNet.IntegrationTests/
# 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
- name: Run Integration Tests Mono
run: |
sudo apt-get install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install mono-devel
dotnet test \
-f net48 \
--no-build \
--logger "console;verbosity=normal" \
--logger GitHubActions \
-p:CollectCoverage=true \
-p:CoverletOutputFormat=cobertura \
-p:CoverletOutput=../../coverlet/linux_integration_test_net_48_coverage.xml \
--filter "Name~Ecdh|Name~ECDsa|Name~Zlib|Name~Gcm" \
test/Renci.SshNet.IntegrationTests/
- name: Archive Coverlet Results
uses: actions/upload-artifact@v4
with:
name: Coverlet Results Linux
path: coverlet

Windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for Nerdbank.GitVersioning

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Build Solution
run: dotnet build Renci.SshNet.sln

- name: Publish AOT Compatibility Test App
run: dotnet publish -r win-x64 /warnaserror test/Renci.SshNet.AotCompatibilityTestApp/

- name: Create NuGet Package
run: dotnet pack

- name: Archive NuGet Package
uses: actions/upload-artifact@v4
with:
name: NuGet Package
path: src/Renci.SshNet/bin/Release/*.*nupkg

- name: Run Unit Tests .NET
run: |
dotnet test `
-f net9.0 `
--no-build `
--logger "console;verbosity=normal" `
--logger GitHubActions `
-p:CollectCoverage=true `
-p:CoverletOutputFormat=cobertura `
-p:CoverletOutput=../../coverlet/windows_unit_test_net_9_coverage.xml `
test/Renci.SshNet.Tests/
- name: Run Unit Tests .NET Framework
run: |
dotnet test `
-f net462 `
--no-build `
--logger "console;verbosity=normal" `
--logger GitHubActions `
-p:CollectCoverage=true `
-p:CoverletOutputFormat=cobertura `
-p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
test/Renci.SshNet.Tests/
- name: Archive Coverlet Results
uses: actions/upload-artifact@v4
with:
name: Coverlet Results Windows
path: coverlet

Publish:
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/develop'
permissions:
packages: write
needs:
- Windows
- Linux
steps:
- name: Download NuGet Package
uses: actions/download-artifact@v4
with:
name: NuGet Package

- name: Publish to GitHub NuGet Registry
run: |
dotnet nuget add source \
--username $GITHUB_ACTOR \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
dotnet nuget push "*.nupkg" \
--source github \
--api-key ${{ secrets.GITHUB_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Docs

on:
push:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Setup docfx
run: dotnet tool update -g docfx

- name: Build documentation
run: docfx ./docfx/docfx.json

- name: Upload documentation
uses: actions/upload-pages-artifact@v3
with:
path: './docfx/_site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading

0 comments on commit 4dcd67e

Please sign in to comment.