Skip to content

Commit

Permalink
feat(NET): support netstandard2.0 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
texastony authored Dec 20, 2023
1 parent 8e40364 commit 98a16a8
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 10 deletions.
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,33 @@ updates:
directory: ".github/workflows"
schedule:
interval: "daily"
# STD NET
- package-ecosystem: "nuget"
directory: "StandardLibrary/runtimes/net/STD.csproj"
schedule:
interval: "daily"
# KMS NET
- package-ecosystem: "nuget"
directory: "ComAmazonawsKms/runtimes/net/AWS-KMS.csproj"
schedule:
interval: "daily"
# DDB NET
- package-ecosystem: "nuget"
directory: "ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj"
schedule:
interval: "daily"
# Crypto NET
- package-ecosystem: "nuget"
directory: "AwsCryptographyPrimitives/runtimes/net/Crypto.csproj"
schedule:
interval: "daily"
# MPL NET
- package-ecosystem: "nuget"
directory: "AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj"
schedule:
interval: "daily"
# Test Vectors NET
- package-ecosystem: "nuget"
directory: "TestVectorsAwsCryptographicMaterialProviders/runtimes/net/TestVectors.csproj"
schedule:
interval: "daily"
18 changes: 15 additions & 3 deletions .github/workflows/library_net_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ jobs:
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net CORES=$CORES
# .NET Framework is only supported in Windows
# .NET Framework is a software development framework
# for building and running applications on Windows.
# https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet-framework
- name: Test ${{ matrix.library }} .NET Framework net48
if: matrix.os == 'windows-latest'
working-directory: ./${{ matrix.library }}
Expand All @@ -88,15 +90,25 @@ jobs:
make test_net FRAMEWORK=net6.0
fi
- name: Test Cache Thread Safety
- name: Test Cache Thread Safety net6.0
if: matrix.library == 'AwsCryptographicMaterialProviders'
working-directory: ./${{ matrix.library }}
shell: bash
## Run .NET 6.0 and .NET Framework net48
run: |
dotnet restore runtimes/net/tests/LocalCMC.Tests/
dotnet build runtimes/net/tests/LocalCMC.Tests/
dotnet test runtimes/net/tests/LocalCMC.Tests/ \
--framework net6.0
# .NET Framework is a software development framework
# for building and running applications on Windows.
# https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet-framework
- name: Test Cache Thread Safety .NET Framework net48
if: matrix.os == 'windows-latest' && matrix.library == 'AwsCryptographicMaterialProviders'
working-directory: ./${{ matrix.library }}
shell: bash
run: |
dotnet restore runtimes/net/tests/LocalCMC.Tests/
dotnet build runtimes/net/tests/LocalCMC.Tests/
dotnet test runtimes/net/tests/LocalCMC.Tests/ \
--framework net48
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phases:
- export BASE=../codebuild/net
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
build:
commands:
- mkdir build
Expand Down
2 changes: 2 additions & 0 deletions AwsCryptographicMaterialProviders/codebuild/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ phases:
- export BASE=../codebuild/net
- python $BASE/upload_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
## Retrieve the signed assembly. We're not going to use it, but this
## ensures that the signing process is complete
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
5 changes: 5 additions & 0 deletions AwsCryptographicMaterialProviders/codebuild/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ phases:
- python codebuild/net/retrieve_signed_assembly.py --target net6.0 --unique-id $Env:UNIQUE_ID --output net6.0
- $sig = Get-AuthenticodeSignature -FilePath net6.0/$Env:FILE_NAME
- $sig | Format-List -Property *
# Check signature on netstandard2.0 dll
- mkdir netstandard2.0
- python codebuild/net/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $Env:UNIQUE_ID --output netstandard2.0
- $sig = Get-AuthenticodeSignature -FilePath netstandard2.0/$Env:FILE_NAME
- $sig | Format-List -Property *
2 changes: 1 addition & 1 deletion AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!--
Ignore errors from generated code. Ideally this would be scoped to just the relevant files.
Expand Down
1 change: 1 addition & 0 deletions AwsCryptographyPrimitives/codebuild/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phases:
- export BASE=../codebuild/net
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
build:
commands:
- mkdir build
Expand Down
2 changes: 2 additions & 0 deletions AwsCryptographyPrimitives/codebuild/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ phases:
- export BASE=../codebuild/net
- python $BASE/upload_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
## Retrieve the signed assembly. We're not going to use it, but this
## ensures that the signing process is complete
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
5 changes: 5 additions & 0 deletions AwsCryptographyPrimitives/codebuild/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ phases:
- python codebuild/net/retrieve_signed_assembly.py --target net6.0 --unique-id $Env:UNIQUE_ID --output net6.0
- $sig = Get-AuthenticodeSignature -FilePath net6.0/$Env:FILE_NAME
- $sig | Format-List -Property *
# Check signature on netstandard2.0 dll
- mkdir netstandard2.0
- python codebuild/net/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $Env:UNIQUE_ID --output netstandard2.0
- $sig = Get-AuthenticodeSignature -FilePath netstandard2.0/$Env:FILE_NAME
- $sig | Format-List -Property *
2 changes: 1 addition & 1 deletion AwsCryptographyPrimitives/runtimes/net/Crypto.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!--
Ignore errors from generated code. Ideally this would be scoped to just the relevant files.
Expand Down
1 change: 1 addition & 0 deletions ComAmazonawsDynamodb/codebuild/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phases:
- export BASE=../codebuild/net
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
build:
commands:
- mkdir build
Expand Down
2 changes: 2 additions & 0 deletions ComAmazonawsDynamodb/codebuild/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ phases:
- export BASE=../codebuild/net
- python $BASE/upload_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
## Retrieve the signed assembly. We're not going to use it, but this
## ensures that the signing process is complete
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
5 changes: 5 additions & 0 deletions ComAmazonawsDynamodb/codebuild/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ phases:
- python codebuild/net/retrieve_signed_assembly.py --target net6.0 --unique-id $Env:UNIQUE_ID --output net6.0
- $sig = Get-AuthenticodeSignature -FilePath net6.0/$Env:FILE_NAME
- $sig | Format-List -Property *
# Check signature on netstandard2.0 dll
- mkdir netstandard2.0
- python codebuild/net/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $Env:UNIQUE_ID --output netstandard2.0
- $sig = Get-AuthenticodeSignature -FilePath netstandard2.0/$Env:FILE_NAME
- $sig | Format-List -Property *
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!--
Ignore errors from generated code. Ideally this would be scoped to just the relevant files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>TEST_AWS_DDB</RootNamespace>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<LangVersion>10</LangVersion>
<OutputType>Exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
Expand Down
1 change: 1 addition & 0 deletions ComAmazonawsKms/codebuild/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phases:
- export BASE=../codebuild/net
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
build:
commands:
- mkdir build
Expand Down
2 changes: 2 additions & 0 deletions ComAmazonawsKms/codebuild/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ phases:
- export BASE=../codebuild/net
- python $BASE/upload_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
## Retrieve the signed assembly. We're not going to use it, but this
## ensures that the signing process is complete
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
5 changes: 5 additions & 0 deletions ComAmazonawsKms/codebuild/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ phases:
- python codebuild/net/retrieve_signed_assembly.py --target net6.0 --unique-id $Env:UNIQUE_ID --output net6.0
- $sig = Get-AuthenticodeSignature -FilePath net6.0/$Env:FILE_NAME
- $sig | Format-List -Property *
# Check signature on netstandard2.0 dll
- mkdir netstandard2.0
- python codebuild/net/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $Env:UNIQUE_ID --output netstandard2.0
- $sig = Get-AuthenticodeSignature -FilePath netstandard2.0/$Env:FILE_NAME
- $sig | Format-List -Property *
2 changes: 1 addition & 1 deletion ComAmazonawsKms/runtimes/net/AWS-KMS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!--
Ignore errors from generated code. Ideally this would be scoped to just the relevant files.
Expand Down
1 change: 1 addition & 0 deletions StandardLibrary/codebuild/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phases:
- export BASE=../codebuild/net
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
build:
commands:
- mkdir build
Expand Down
2 changes: 2 additions & 0 deletions StandardLibrary/codebuild/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ phases:
- export BASE=../codebuild/net
- python $BASE/upload_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/upload_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
## Retrieve the signed assembly. We're not going to use it, but this
## ensures that the signing process is complete
- python $BASE/retrieve_signed_assembly.py --target net6.0 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target net48 --unique-id $UNIQUE_ID
- python $BASE/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $UNIQUE_ID
5 changes: 5 additions & 0 deletions StandardLibrary/codebuild/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ phases:
- python codebuild/net/retrieve_signed_assembly.py --target net6.0 --unique-id $Env:UNIQUE_ID --output net6.0
- $sig = Get-AuthenticodeSignature -FilePath net6.0/$Env:FILE_NAME
- $sig | Format-List -Property *
# Check signature on netstandard2.0 dll
- mkdir netstandard2.0
- python codebuild/net/retrieve_signed_assembly.py --target netstandard2.0 --unique-id $Env:UNIQUE_ID --output netstandard2.0
- $sig = Get-AuthenticodeSignature -FilePath netstandard2.0/$Env:FILE_NAME
- $sig | Format-List -Property *
2 changes: 1 addition & 1 deletion StandardLibrary/runtimes/net/STD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!--
Ignore errors from generated code. Ideally this would be scoped to just the relevant files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>10</LangVersion>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net48;netstandard2.0</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down

0 comments on commit 98a16a8

Please sign in to comment.