Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
*Issue #, if available:*
_Issue #, if available:_

*Description of changes:*

*Squash/merge commit message, if applicable:*
_Description of changes:_

_Squash/merge commit message, if applicable:_

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
2 changes: 1 addition & 1 deletion .github/actions/polymorph_codegen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ runs:
make -C mpl/AwsCryptographicMaterialProviders setup_prettier
make -C mpl/ComAmazonawsKms setup_prettier
make -C mpl/ComAmazonawsDynamodb setup_prettier

# In the ESDK Dafny it does not make sense to run smithy dafny for java code
# since the java esdk written natively and not through dafny
#- name: Regenerate Java code using smithy-dafny
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/dafny_format_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow reads the project.properties
# into the environment variables
# and then creates an output variable for `dafnyFormatVersion `
name: Dafny Format Version

on:
workflow_call:
outputs:
version:
description: "The dafny version for format"
value: ${{ jobs.getDafnyFormatVersion.outputs.version }}

jobs:
getDafnyFormatVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyFormatVersion }}
steps:
- uses: actions/checkout@v4
- name: Read version from Properties-file
id: read_property
uses: christian-draeger/read-properties@1.1.1
with:
path: "./project.properties"
properties: "dafnyFormatVersion"
18 changes: 7 additions & 11 deletions .github/workflows/dafny_interop_test_net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [
windows-latest,
ubuntu-22.04,
macos-13,
]
os: [windows-latest, ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -58,7 +54,7 @@ jobs:
- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: "6.0.x"

- name: Setup MPL Dafny
uses: dafny-lang/setup-dafny-action@v1.7.2
Expand All @@ -82,12 +78,12 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-session-name: NetTests

- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
shell: bash
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
run: |
make setup_net
# This works because `node` is installed by default on GHA runners
Expand All @@ -109,7 +105,7 @@ jobs:

- name: Test .NET Framework net48
working-directory: ./AwsEncryptionSDK
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-latest'
shell: bash
run: |
make test_net FRAMEWORK=net48
Expand All @@ -126,7 +122,7 @@ jobs:

- name: Test Examples on .NET Framework net48
working-directory: ./AwsEncryptionSDK
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-latest'
shell: bash
run: |
dotnet test \
Expand Down Expand Up @@ -215,7 +211,7 @@ jobs:
# We want this to fail, so if it returned 1, step passes, else it fails
# TODO Post-#619: Refactor Test Vectors to expect failure,
# as I doubt this true false logic works

- name: Run ESDK-NET @ v4.0.0 Invalid Vectors .NET expect Success
working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors
shell: bash
Expand Down
48 changes: 19 additions & 29 deletions .github/workflows/dafny_interop_test_vector_net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ jobs:
decrypt_python_vectors:
strategy:
matrix:
os: [
windows-latest,
ubuntu-22.04,
macos-13,
]
os: [windows-latest, ubuntu-22.04, macos-13]
runs-on: ${{matrix.os}}
permissions:
id-token: write
Expand All @@ -57,7 +53,7 @@ jobs:
- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: "6.0.x"

- name: Setup MPL Dafny
uses: dafny-lang/setup-dafny-action@v1.7.2
Expand All @@ -81,12 +77,12 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-session-name: NetTests

- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
shell: bash
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
run: |
make setup_net
# This works because `node` is installed by default on GHA runners
Expand Down Expand Up @@ -125,7 +121,7 @@ jobs:
PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors
DAFNY_AWS_ESDK_TEST_VECTOR_MANIFEST_PATH="$PYTHON_23_VECTOR_PATH/manifest.json" \
dotnet test --framework net48

- name: Decrypt Python 2.3.0 Test Vectors on .net6.0
working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors
if: matrix.os != 'windows-latest'
Expand All @@ -144,10 +140,7 @@ jobs:
generate_vectors:
strategy:
matrix:
os: [
ubuntu-22.04,
macos-13,
]
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -167,7 +160,7 @@ jobs:
- name: Setup .NET Core SDK 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: "6.0.x"

- name: Setup MPL Dafny
uses: dafny-lang/setup-dafny-action@v1.7.2
Expand All @@ -191,12 +184,12 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-session-name: NetTests

- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
shell: bash
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
run: |
make setup_net
# This works because `node` is installed by default on GHA runners
Expand Down Expand Up @@ -228,7 +221,7 @@ jobs:
dotnet run --project $GEN_PATH --framework net6.0 -- \
--encrypt-manifest $GEN_PATH/resources/0006-awses-message-decryption-generation.v2.json \
--output-dir $NET_41_VECTOR_PATH

- name: Zip the Generated Test Vectors for ESDK-JS on Mac/Linux
if: matrix.os != 'windows-latest'
working-directory: ./AwsEncryptionSDK
Expand All @@ -237,7 +230,7 @@ jobs:
NET_41_VECTOR_PATH=net41/vectors
cd $NET_41_VECTOR_PATH
zip -qq net41.zip -r .

- name: Upload Zip File
uses: actions/upload-artifact@v4
if: matrix.os != 'windows-latest'
Expand All @@ -249,10 +242,7 @@ jobs:
needs: generate_vectors
strategy:
matrix:
os: [
ubuntu-22.04,
macos-13,
]
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -267,36 +257,36 @@ jobs:
run: |
git submodule update --init libraries
git submodule update --init --recursive mpl

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
role-session-name: NetTests

- name: Set up Dirs
working-directory: ./AwsEncryptionSDK
run: |
NET_41_VECTOR_PATH=AwsEncryptionSDK/net41/vectors
mkdir -p $NET_41_VECTOR_PATH

- name: Download Encrypt Manifest Artifact
uses: actions/download-artifact@v4
with:
name: ${{matrix.os}}_vector_artifact
path: AwsEncryptionSDK/net41/vectors

- uses: actions/setup-node@v4
with:
node-version: 17
node-version: 17

- name: Install deps
run: |
openssl version
npm install @aws-crypto/integration-node
npm install fast-xml-parser

- name: Decrypt Generated Test Vectors with ESDK-JS
working-directory: ./AwsEncryptionSDK
# TODO Post-#619: Fix Zip file creation on Windows
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/dafny_verify_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow reads the project.properties
# into the environment variables
# and then creates an output variable for `dafnyVerifyVersion `
name: Dafny Verify Version

on:
workflow_call:
outputs:
version:
description: "The dafny version for verify"
value: ${{ jobs.getDafnyVerifyVersion.outputs.version }}

jobs:
getDafnyVerifyVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyVerifyVersion }}
steps:
- uses: actions/checkout@v4
- name: Read version from Properties-file
id: read_property
uses: christian-draeger/read-properties@1.1.1
with:
path: "./project.properties"
properties: "dafnyVerifyVersion"
25 changes: 25 additions & 0 deletions .github/workflows/dafny_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow reads the project.properties
# into the environment variables
# and then creates an output variable for `dafnyVersion`
name: Dafny Version

on:
workflow_call:
outputs:
version:
description: "The dafny version"
value: ${{ jobs.getDafnyVersion.outputs.version }}

jobs:
getDafnyVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyVersion }}
steps:
- uses: actions/checkout@v4
- name: Read version from Properties-file
id: read_property
uses: christian-draeger/read-properties@1.1.1
with:
path: "./project.properties"
properties: "dafnyVersion"
Loading
Loading