@@ -23,27 +23,26 @@ phases:
23
23
- aws s3 cp s3://generated-vectors-artifacts-bucket/$CODEBUILD_RESOLVED_SOURCE_VERSION/312_hkeyring_reccmm_manifest.zip 312_hkeyring_reccmm_manifest.zip
24
24
- unzip 312_hkeyring_reccmm_manifest.zip
25
25
- 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
29
32
- unzip -qq dafny.zip && rm dafny.zip
30
33
- export PATH="$PWD/dafny:$PATH"
31
34
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/
41
37
- make transpile_net
42
38
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
47
46
48
47
build :
49
48
commands :
0 commit comments