Skip to content

Commit 3ce52fa

Browse files
authored
chore: configure with project.properties (#750)
1 parent b3cb599 commit 3ce52fa

File tree

79 files changed

+3634
-3367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3634
-3367
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
*Issue #, if available:*
1+
_Issue #, if available:_
22

3-
*Description of changes:*
4-
5-
*Squash/merge commit message, if applicable:*
3+
_Description of changes:_
64

5+
_Squash/merge commit message, if applicable:_
76

87
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/actions/polymorph_codegen/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ runs:
8888
make -C mpl/AwsCryptographicMaterialProviders setup_prettier
8989
make -C mpl/ComAmazonawsKms setup_prettier
9090
make -C mpl/ComAmazonawsDynamodb setup_prettier
91-
91+
9292
# In the ESDK Dafny it does not make sense to run smithy dafny for java code
9393
# since the java esdk written natively and not through dafny
9494
#- name: Regenerate Java code using smithy-dafny
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow reads the project.properties
2+
# into the environment variables
3+
# and then creates an output variable for `dafnyFormatVersion `
4+
name: Dafny Format Version
5+
6+
on:
7+
workflow_call:
8+
outputs:
9+
version:
10+
description: "The dafny version for format"
11+
value: ${{ jobs.getDafnyFormatVersion.outputs.version }}
12+
13+
jobs:
14+
getDafnyFormatVersion:
15+
runs-on: ubuntu-22.04
16+
outputs:
17+
version: ${{ steps.read_property.outputs.dafnyFormatVersion }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Read version from Properties-file
21+
id: read_property
22+
uses: christian-draeger/[email protected]
23+
with:
24+
path: "./project.properties"
25+
properties: "dafnyFormatVersion"

.github/workflows/dafny_interop_test_net.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
os: [
38-
windows-latest,
39-
ubuntu-22.04,
40-
macos-13,
41-
]
37+
os: [windows-latest, ubuntu-22.04, macos-13]
4238
runs-on: ${{ matrix.os }}
4339
permissions:
4440
id-token: write
@@ -58,7 +54,7 @@ jobs:
5854
- name: Setup .NET Core SDK 6
5955
uses: actions/setup-dotnet@v3
6056
with:
61-
dotnet-version: '6.0.x'
57+
dotnet-version: "6.0.x"
6258

6359
- name: Setup MPL Dafny
6460
uses: dafny-lang/[email protected]
@@ -82,12 +78,12 @@ jobs:
8278
uses: aws-actions/configure-aws-credentials@v4
8379
with:
8480
aws-region: us-west-2
85-
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
81+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
8682
role-session-name: NetTests
8783

8884
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
8985
shell: bash
90-
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
86+
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
9187
run: |
9288
make setup_net
9389
# This works because `node` is installed by default on GHA runners
@@ -109,7 +105,7 @@ jobs:
109105
110106
- name: Test .NET Framework net48
111107
working-directory: ./AwsEncryptionSDK
112-
if: matrix.os == 'windows-latest'
108+
if: matrix.os == 'windows-latest'
113109
shell: bash
114110
run: |
115111
make test_net FRAMEWORK=net48
@@ -126,7 +122,7 @@ jobs:
126122
127123
- name: Test Examples on .NET Framework net48
128124
working-directory: ./AwsEncryptionSDK
129-
if: matrix.os == 'windows-latest'
125+
if: matrix.os == 'windows-latest'
130126
shell: bash
131127
run: |
132128
dotnet test \
@@ -215,7 +211,7 @@ jobs:
215211
# We want this to fail, so if it returned 1, step passes, else it fails
216212
# TODO Post-#619: Refactor Test Vectors to expect failure,
217213
# as I doubt this true false logic works
218-
214+
219215
- name: Run ESDK-NET @ v4.0.0 Invalid Vectors .NET expect Success
220216
working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors
221217
shell: bash

.github/workflows/dafny_interop_test_vector_net.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ jobs:
3333
decrypt_python_vectors:
3434
strategy:
3535
matrix:
36-
os: [
37-
windows-latest,
38-
ubuntu-22.04,
39-
macos-13,
40-
]
36+
os: [windows-latest, ubuntu-22.04, macos-13]
4137
runs-on: ${{matrix.os}}
4238
permissions:
4339
id-token: write
@@ -57,7 +53,7 @@ jobs:
5753
- name: Setup .NET Core SDK 6
5854
uses: actions/setup-dotnet@v3
5955
with:
60-
dotnet-version: '6.0.x'
56+
dotnet-version: "6.0.x"
6157

6258
- name: Setup MPL Dafny
6359
uses: dafny-lang/[email protected]
@@ -81,12 +77,12 @@ jobs:
8177
uses: aws-actions/configure-aws-credentials@v4
8278
with:
8379
aws-region: us-west-2
84-
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
80+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
8581
role-session-name: NetTests
8682

8783
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
8884
shell: bash
89-
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
85+
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
9086
run: |
9187
make setup_net
9288
# This works because `node` is installed by default on GHA runners
@@ -125,7 +121,7 @@ jobs:
125121
PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors
126122
DAFNY_AWS_ESDK_TEST_VECTOR_MANIFEST_PATH="$PYTHON_23_VECTOR_PATH/manifest.json" \
127123
dotnet test --framework net48
128-
124+
129125
- name: Decrypt Python 2.3.0 Test Vectors on .net6.0
130126
working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors
131127
if: matrix.os != 'windows-latest'
@@ -144,10 +140,7 @@ jobs:
144140
generate_vectors:
145141
strategy:
146142
matrix:
147-
os: [
148-
ubuntu-22.04,
149-
macos-13,
150-
]
143+
os: [ubuntu-22.04, macos-13]
151144
runs-on: ${{ matrix.os }}
152145
permissions:
153146
id-token: write
@@ -167,7 +160,7 @@ jobs:
167160
- name: Setup .NET Core SDK 6
168161
uses: actions/setup-dotnet@v3
169162
with:
170-
dotnet-version: '6.0.x'
163+
dotnet-version: "6.0.x"
171164

172165
- name: Setup MPL Dafny
173166
uses: dafny-lang/[email protected]
@@ -191,12 +184,12 @@ jobs:
191184
uses: aws-actions/configure-aws-credentials@v4
192185
with:
193186
aws-region: us-west-2
194-
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
187+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
195188
role-session-name: NetTests
196189

197190
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
198191
shell: bash
199-
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
192+
working-directory: mpl/TestVectorsAwsCryptographicMaterialProviders
200193
run: |
201194
make setup_net
202195
# This works because `node` is installed by default on GHA runners
@@ -228,7 +221,7 @@ jobs:
228221
dotnet run --project $GEN_PATH --framework net6.0 -- \
229222
--encrypt-manifest $GEN_PATH/resources/0006-awses-message-decryption-generation.v2.json \
230223
--output-dir $NET_41_VECTOR_PATH
231-
224+
232225
- name: Zip the Generated Test Vectors for ESDK-JS on Mac/Linux
233226
if: matrix.os != 'windows-latest'
234227
working-directory: ./AwsEncryptionSDK
@@ -237,7 +230,7 @@ jobs:
237230
NET_41_VECTOR_PATH=net41/vectors
238231
cd $NET_41_VECTOR_PATH
239232
zip -qq net41.zip -r .
240-
233+
241234
- name: Upload Zip File
242235
uses: actions/upload-artifact@v4
243236
if: matrix.os != 'windows-latest'
@@ -249,10 +242,7 @@ jobs:
249242
needs: generate_vectors
250243
strategy:
251244
matrix:
252-
os: [
253-
ubuntu-22.04,
254-
macos-13,
255-
]
245+
os: [ubuntu-22.04, macos-13]
256246
runs-on: ${{ matrix.os }}
257247
permissions:
258248
id-token: write
@@ -267,36 +257,36 @@ jobs:
267257
run: |
268258
git submodule update --init libraries
269259
git submodule update --init --recursive mpl
270-
260+
271261
- name: Configure AWS Credentials
272262
uses: aws-actions/configure-aws-credentials@v4
273263
with:
274264
aws-region: us-west-2
275-
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
265+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
276266
role-session-name: NetTests
277-
267+
278268
- name: Set up Dirs
279269
working-directory: ./AwsEncryptionSDK
280270
run: |
281271
NET_41_VECTOR_PATH=AwsEncryptionSDK/net41/vectors
282272
mkdir -p $NET_41_VECTOR_PATH
283-
273+
284274
- name: Download Encrypt Manifest Artifact
285275
uses: actions/download-artifact@v4
286276
with:
287277
name: ${{matrix.os}}_vector_artifact
288278
path: AwsEncryptionSDK/net41/vectors
289-
279+
290280
- uses: actions/setup-node@v4
291281
with:
292-
node-version: 17
282+
node-version: 17
293283

294284
- name: Install deps
295285
run: |
296286
openssl version
297287
npm install @aws-crypto/integration-node
298288
npm install fast-xml-parser
299-
289+
300290
- name: Decrypt Generated Test Vectors with ESDK-JS
301291
working-directory: ./AwsEncryptionSDK
302292
# TODO Post-#619: Fix Zip file creation on Windows
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow reads the project.properties
2+
# into the environment variables
3+
# and then creates an output variable for `dafnyVerifyVersion `
4+
name: Dafny Verify Version
5+
6+
on:
7+
workflow_call:
8+
outputs:
9+
version:
10+
description: "The dafny version for verify"
11+
value: ${{ jobs.getDafnyVerifyVersion.outputs.version }}
12+
13+
jobs:
14+
getDafnyVerifyVersion:
15+
runs-on: ubuntu-22.04
16+
outputs:
17+
version: ${{ steps.read_property.outputs.dafnyVerifyVersion }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Read version from Properties-file
21+
id: read_property
22+
uses: christian-draeger/[email protected]
23+
with:
24+
path: "./project.properties"
25+
properties: "dafnyVerifyVersion"

.github/workflows/dafny_version.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow reads the project.properties
2+
# into the environment variables
3+
# and then creates an output variable for `dafnyVersion`
4+
name: Dafny Version
5+
6+
on:
7+
workflow_call:
8+
outputs:
9+
version:
10+
description: "The dafny version"
11+
value: ${{ jobs.getDafnyVersion.outputs.version }}
12+
13+
jobs:
14+
getDafnyVersion:
15+
runs-on: ubuntu-22.04
16+
outputs:
17+
version: ${{ steps.read_property.outputs.dafnyVersion }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Read version from Properties-file
21+
id: read_property
22+
uses: christian-draeger/[email protected]
23+
with:
24+
path: "./project.properties"
25+
properties: "dafnyVersion"

0 commit comments

Comments
 (0)