@@ -23,27 +23,26 @@ phases:
2323 - aws s3 cp s3://generated-vectors-artifacts-bucket/$CODEBUILD_RESOLVED_SOURCE_VERSION/312_hkeyring_reccmm_manifest.zip 312_hkeyring_reccmm_manifest.zip
2424 - unzip 312_hkeyring_reccmm_manifest.zip
2525 - export DAFNY_AWS_ESDK_TEST_VECTOR_MANIFEST_PATH="${PWD}/312_hkeyring_reccmm_manifest/manifest.json"
26-
27- # Download dafny
28- - curl https://github.com/dafny-lang/dafny/releases/download/v4.7.0/dafny-4.7.0-x64-ubuntu-20.04.zip -L -o dafny.zip
26+
27+ # Clone SDK-Dafny repo to get test vectors runner source code and the Dafny version to use
28+ - git clone --recurse-submodules https://github.com/aws/aws-encryption-sdk-dafny.git
29+ # Download Dafny to build the test vector runner; get Dafny version from ESDK's project.properties file
30+ - export dafnyVersion=$(grep '^dafnyVersion=' aws-encryption-sdk-dafny/AwsEncryptionSDK/project.properties | cut -d '=' -f 2)
31+ - curl https://github.com/dafny-lang/dafny/releases/download/v$dafnyVersion/dafny-$dafnyVersion-x64-ubuntu-20.04.zip -L -o dafny.zip
2932 - unzip -qq dafny.zip && rm dafny.zip
3033 - export PATH="$PWD/dafny:$PATH"
3134
32- # Clone SDK-Dafny repo to get test vectors runner
33- - git clone --recurse-submodules https://github.com/aws/aws-encryption-sdk-dafny.git
34- # TODO: Change branch to published when available
35- - cd aws-encryption-sdk-dafny
36- - git checkout lucmcdon/hkeyring-vectors
37- - git pull
38- - cd AwsEncryptionSDK/
39- - make transpile_net
40- - cd ../mpl/TestVectorsAwsCryptographicMaterialProviders/
35+ # Build MPL test vector runner from source
36+ - cd aws-encryption-sdk-dafny/mpl/TestVectorsAwsCryptographicMaterialProviders/
4137 - make transpile_net
4238
43- # Change TestVectors to reference the published .NET ESDK
44- - cd ../../AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors
45- # - sed -i -e 's/<ProjectReference Include="\.\.\/\.\.\/ESDK\.csproj" \/>/<PackageReference Include="AWS.Cryptography.EncryptionSDK" Version="4.0.1" \/>/g' AWSEncryptionSDKTestVectorLib.csproj
46- # - cd ../TestVectors
39+ # Change ESDK TestVectors project to reference the published .NET ESDK
40+ - cd ../../AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorLib
41+ # CodeBuild seems to want to use ESDK-NET 4.0.0, which is not the most recent version...
42+ # Pin to at least 4.1.0; this is the most recent version at time of writing.
43+ # Hopefully CodeBuild will find more recent versions in the future
44+ - sed -i 's|<ProjectReference Include="\.\./\.\./ESDK\.csproj" />|<PackageReference Include="AWS.Cryptography.EncryptionSDK" Version="[4.1.0,)" />|g' AWSEncryptionSDKTestVectorLib.csproj
45+ - cd ../TestVectors
4746
4847 build :
4948 commands :
0 commit comments