Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from AppVeyor to GitHub Actions #1539

Merged
merged 9 commits into from
Nov 23, 2024
Merged

Conversation

mus65
Copy link
Contributor

@mus65 mus65 commented Nov 16, 2024

This migrates from AppVeyor to GitHub Actions. This initially came up in #1480 (comment) because we would have to wait for AppVeyor to support .NET 9 .

I tried to keep the functionality mostly the same. I made the following changes:

  • Replaced AppVeyor.TestLogger with GitHubActionsTestLogger so the test results are displayed in GitHub.
  • removed LiquidTestReports.Markdown integration. This was added with Test integration tests #1250 . Not sure how useful this is considering the test results are visible in GitHub directly now. I could add it back.
  • removed redundant -c and --no-restore parameters from dotnet calls
  • mono must be installed manually since the runner doesn't provide it out-of-the-box.
  • Upgraded AotCompatibilityTestApp to net9.0 already here since net8.0 would result in the following failure. No idea why this doesn't happen in AppVeyor.
Run dotnet publish -r win-x64 /warnaserror .\test\Renci.SshNet.AotCompatibilityTestApp\
  Determining projects to restore...
  Restored D:\a\SSH.NET\SSH.NET\test\Renci.SshNet.AotCompatibilityTestApp\Renci.SshNet.AotCompatibilityTestApp.csproj (in 357 ms).
  Restored D:\a\SSH.NET\SSH.NET\src\Renci.SshNet\Renci.SshNet.csproj (in 365 ms).
  Renci.SshNet -> D:\a\SSH.NET\SSH.NET\src\Renci.SshNet\bin\Release\net8.0\Renci.SshNet.dll
  Renci.SshNet.AotCompatibilityTestApp -> D:\a\SSH.NET\SSH.NET\test\Renci.SshNet.AotCompatibilityTestApp\bin\Release\net8.0\win-x64\Renci.SshNet.AotCompatibilityTestApp.dll
  Generating native code
Error: /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicApi.cs(90): error IL3000: System.Net.Quic.MsQuicApi..cctor(): 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. [D:\a\SSH.NET\SSH.NET\test\Renci.SshNet.AotCompatibilityTestApp\Renci.SshNet.AotCompatibilityTestApp.csproj]
  Renci.SshNet.AotCompatibilityTestApp -> D:\a\SSH.NET\SSH.NET\test\Renci.SshNet.AotCompatibilityTestApp\bin\Release\net8.0\win-x64\publish\

Coverlet results are still only archived but not integrated or displayed anywhere. There is #1257 open for this. There is also some kind of GitHub Integration for this. I could look into this separately.

@mus65
Copy link
Contributor Author

mus65 commented Nov 16, 2024

Test results and artifacts: https://github.com/sshnet/SSH.NET/actions/runs/11869304328

It still tries to run AppVeyor here. I assume this must be disabled in the project.

side note: I have not seen a single flaky test failure while testing this. 😄

this is needed to re-run jobs manually from the web UI
Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot faster too. One thing I think is missing at the moment is a CI nuget feed that we get automatically with appveyor.

Unless you want to take a look now, I suggest we just keep only the dotnet pack part of appveyor.yml to keep that bit going, and then look to use github packages or similar for a CI feed in a follow-up

(also because I don't think I have permissions to remove the appveyor check so easiest to keep around in the meantime)

@mus65
Copy link
Contributor Author

mus65 commented Nov 19, 2024

I was actually already looking into pushing to the GitHub NuGet Registry. I just finished it up and pushed it here.

NuGet result can be seen here: https://github.com/mus65/SSH.NET/pkgs/nuget/SSH.NET . This will not run for this PR because of the filter on the develop branch.

I will add a minimal appveyor.yml to avoid failure (just tested with an empty file, but that doesn't seem to work).

@Rob-Hague Rob-Hague merged commit f65ca44 into sshnet:develop Nov 23, 2024
4 checks passed
@mus65
Copy link
Contributor Author

mus65 commented Nov 23, 2024

The NuGet package was pushed successfully on the develop branch, but it's not actually visible. I think this may be related to the Package permissions settings on the organization (which I obviously don't have access to).

@Rob-Hague
Copy link
Collaborator

Should be good now

mus65 added a commit to mus65/SSH.NET that referenced this pull request Nov 30, 2024
Follow-up sshnet#1539. Looks like AppVeyor has been disabled.
@mus65 mus65 mentioned this pull request Nov 30, 2024
Rob-Hague pushed a commit that referenced this pull request Nov 30, 2024
Follow-up #1539. Looks like AppVeyor has been disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants