-
Notifications
You must be signed in to change notification settings - Fork 55
Bug/193 nativeshims #211
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
base: develop
Are you sure you want to change the base?
Bug/193 nativeshims #211
Conversation
…oaded tests are run on both framework 6 and 8. add dll resolving tests to verify that the necessary dlls can be loaded.
build warning on TFM and nuget package compat ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the GitHub workflows to run tests across multiple .NET framework versions and adds new integration tests (and supporting helper and registry classes) for the Yubico.Core library native library loading functionality. Key changes include:
- New workflow matrix builds for macOS, Ubuntu, and Windows with support for .NET 6.0, 8.0 (and .NET Framework 4.7 on Windows).
- Addition of integration test projects and helper classes to verify native library loading on different platforms.
- Enhancements to platform-specific library registry and library loader to improve native library verification.
Reviewed Changes
Copilot reviewed 40 out of 44 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformLibraryLoader.cs | Added a helper for loading libraries and retrieving error messages across Windows, Linux, and macOS. |
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformLibraryRegistry.cs | Introduced a registry for platform libraries, mapping libraries by OS. |
Yubico.Core/tests/integration/Yubico/PlatformInterop/PlatformTestHelpers.cs | Provided common test helpers for skipping tests on non-target platforms and determining architecture-specific paths. |
Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryTests.cs | Added integration tests that verify loading of native libraries and proper error handling. |
Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryRegistry.cs | Set up a registry of native libraries with per-platform verification lambdas. |
Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs | Updated .NET Framework 4.7 implementation to use RuntimeInformation for determining architecture. |
.github/workflows/test-macos.yml, test-windows.yml, test-ubuntu.yml, test.yml | Updated workflows to run tests on matrix builds across different frameworks and refined file path filters. |
Yubico.Core/tests/unit/Yubico/Core/Cryptography/AesGcmPrimitivesOpenSslTests.cs | Adjusted unit tests to conditionally use new AesGcm constructors with clearer array initialization formatting. |
Files not reviewed (4)
- Yubico.Core/src/Yubico.Core.csproj: Language not supported
- Yubico.Core/tests/integration/Yubico.Core.IntegrationTests.csproj: Language not supported
- Yubico.Core/tests/integration/xunit.runner.json: Language not supported
- Yubico.Core/tests/unit/Yubico.Core.UnitTests.csproj: Language not supported
Comments suppressed due to low confidence (1)
Yubico.Core/tests/unit/Yubico/Core/Cryptography/AesGcmPrimitivesOpenSslTests.cs:73
- [nitpick] Review the conditional compilation blocks for AesGcm usage to ensure consistency and clarity between .NET versions; aligning the formatting and structure can improve maintainability.
#if NET6_0
Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryRegistry.cs
Outdated
Show resolved
Hide resolved
# - '**.csproj' | ||
# - '**.sln' | ||
# - '.github/workflows/test.yml' | ||
# Run on specific file paths relevant to tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need
1e0469d
to
9d2a10e
Compare
9d2a10e
to
21220a0
Compare
822fdac
to
0f5170b
Compare
0f5170b
to
27087b9
Compare
062ba7c
to
7ce30d0
Compare
5709a9b
to
6ee41ee
Compare
This pull request includes significant updates to the GitHub workflows and introduces new integration tests for the Yubico.Core library. The most important changes include adding matrix builds for different .NET frameworks, updating test configurations, and adding new files for integration tests.
Workflow Updates:
.github/workflows/test-macos.yml
: Added matrix builds for .NET 6.0 and 8.0, and updated test steps to use matrix framework. [1] [2].github/workflows/test-ubuntu.yml
: Added matrix builds for .NET 6.0 and 8.0, and updated test steps to use matrix framework. [1] [2].github/workflows/test-windows.yml
: Added matrix builds for .NET 6.0, 8.0, and .NET Framework 4.7, and updated test steps to use matrix framework. [1] [2].github/workflows/test.yml
: Enabled tests to run on specific file paths relevant to tests for pull requests and pushes.Integration Tests:
Yubico.Core/tests/integration/Yubico.Core.IntegrationTests.csproj
: Added a new project file for integration tests targeting multiple frameworks.Yubico.Core/tests/integration/Yubico/PlatformInterop/NativeLibraryRegistry.cs
: Introduced a new registry for native libraries to be tested across different platforms.Codebase Enhancements:
Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs
: AddedSystem.Runtime.InteropServices
and updated architecture detection logic to include ARM64. [1] [2]Project Configuration:
Yubico.Core/src/Yubico.Core.csproj
: AddedInternalsVisibleTo
attribute forYubico.Core.IntegrationTests
.