Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 34dae4c

Browse files
author
Lucas McDonald
committedApr 10, 2025·
m
1 parent 5e51f2c commit 34dae4c

File tree

2 files changed

+35
-41
lines changed

2 files changed

+35
-41
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
# This workflow performs test vectors in Python with the client interface.
2-
name: Library Python Test Vectors Client Interface Interop Tests
1+
# This workflow performs test vectors in Python.
2+
name: Library Python Test Vectors
33

44
on:
55
workflow_call:
66
inputs:
7-
mpl-dafny:
8-
description: "The Dafny version to compile the MPL with (4.2.0, dafny-nightly, etc..)"
7+
dafny:
8+
description: "The Dafny version to run"
99
required: true
1010
type: string
11-
mpl-commit:
12-
description: "The MPL commit to use"
11+
regenerate-code:
12+
description: "Regenerate code using smithy-dafny"
1313
required: false
14-
default: "main"
15-
type: string
14+
default: false
15+
type: boolean
1616
mpl-version:
17-
description: "The MPL version to use"
18-
required: true
19-
type: string
20-
dbesdk-dafny:
21-
description: "The Dafny version to compile the DBESDK with (4.2.0, dafny-nightly, etc..)"
22-
required: true
17+
description: "MPL version to use"
18+
required: false
2319
type: string
20+
mpl-head:
21+
description: "Running on MPL HEAD"
22+
required: false
23+
default: false
24+
type: boolean
2425

2526
jobs:
2627
testPython:
@@ -51,51 +52,44 @@ jobs:
5152
- uses: actions/checkout@v3
5253
with:
5354
submodules: recursive
54-
fetch-depth: 0
5555

56-
- name: Setup MPL Dafny
56+
- name: Setup Dafny
5757
uses: ./submodules/MaterialProviders/.github/actions/setup_dafny/
5858
with:
59-
dafny-version: ${{ inputs.mpl-dafny }}
59+
dafny-version: ${{ inputs.dafny }}
6060

61-
- name: Update MPL submodule
61+
- name: Update MPL submodule if using MPL HEAD
62+
if: ${{ inputs.mpl-head == true }}
6263
working-directory: submodules/MaterialProviders
6364
run: |
64-
git fetch
65-
git checkout ${{inputs.mpl-commit}}
65+
git checkout main
66+
git pull
6667
git submodule update --init --recursive
6768
git rev-parse HEAD
6869
70+
- name: Regenerate code using smithy-dafny if necessary
71+
if: ${{ inputs.regenerate-code }}
72+
uses: ./.github/actions/polymorph_codegen
73+
with:
74+
dafny: ${{ env.DAFNY_VERSION }}
75+
library: ${{ matrix.library }}
76+
diff-generated-code: false
77+
update-and-regenerate-mpl: true
78+
6979
- name: Setup Python ${{ matrix.python-version }}
7080
uses: actions/setup-python@v4
7181
with:
7282
python-version: ${{ matrix.python-version }}
7383

74-
- name: Build MPL with Dafny ${{inputs.mpl-dafny}}
75-
working-directory: submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders
76-
run: |
77-
# This works because `node` is installed by default on GHA runners
78-
CORES=$(node -e 'console.log(os.cpus().length)')
79-
make build_python CORES=$CORES
80-
81-
- name: Setup DBESDK Dafny
82-
uses: ./submodules/MaterialProviders/.github/actions/setup_dafny/
83-
with:
84-
dafny-version: ${{ inputs.dbesdk-dafny}}
85-
86-
- name: Build DynamoDbEncryption implementation
87-
shell: bash
88-
working-directory: DynamoDbEncryption
89-
run: |
90-
make transpile_python
91-
9284
- name: Build TestVectors implementation
9385
shell: bash
9486
working-directory: ${{matrix.library}}
9587
run: |
96-
make transpile_python
88+
# This works because `node` is installed by default on GHA runners
89+
CORES=$(node -e 'console.log(os.cpus().length)')
90+
make build_python CORES=$CORES
9791
9892
- name: Test TestVectors
99-
working-directory: ./TestVectors
93+
working-directory: ${{matrix.library}}
10094
run: |
10195
make test_python_${{matrix.interface}}_interface

‎.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
dafny: ${{needs.getVersion.outputs.version}}
6262
pr-ci-python-testvectors:
6363
needs: getVersion
64-
uses: ./.github/workflows/dafny_interop_test_vector_python.yml
64+
uses: ./.github/workflows/ci_test_vector_python.yml
6565
with:
6666
dafny: ${{needs.getVersion.outputs.version}}
6767
pr-ci-net-test-vectors:

0 commit comments

Comments
 (0)
Please sign in to comment.