1414 default : false
1515 type : boolean
1616
17+ # These interop tests are strictly only for Dafny based languages
18+ # or Dafny integrated languages (ESDK-Java, ESDK-Python).
19+ # Additionally, these tests produce the latest version of
20+ # test vector manifests V5. These have the ability to state how to
21+ # build negative test vectors and OnDecrypt constructions.
1722jobs :
18- generateEncryptVectors :
23+ generateKeyringEncryptVectors :
1924 strategy :
25+ fail-fast : false
2026 matrix :
2127 library : [TestVectors]
2228 os : [
2329 # https://taskei.amazon.dev/tasks/CrypTool-5283
2430 # windows-latest,
2531 ubuntu-22.04,
26- macos-13,
2732 ]
28- language : [java, net, rust, go]
33+ language : [java, net, rust, python, go]
2934 # https://taskei.amazon.dev/tasks/CrypTool-5284
3035 dotnet-version : ["6.0.x"]
3136 runs-on : ${{ matrix.os }}
3237 permissions :
3338 id-token : write
3439 contents : read
35-
3640 steps :
3741 - name : Support longpaths on Git checkout
3842 run : |
@@ -45,12 +49,11 @@ jobs:
4549 aws-region : us-west-2
4650 role-to-assume : arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
4751 role-session-name : InterOpTests
52+ role-duration-seconds : 3600
4853
49- - uses : actions/checkout@v3
50- # Not all submodules are needed.
51- # We manually pull the submodule we DO need.
52- - run : git submodule update --init libraries
53- - run : git submodule update --init --recursive mpl
54+ - uses : actions/checkout@v4
55+ with :
56+ submodules : " recursive"
5457
5558 # Set up runtimes
5659 - name : Setup .NET Core SDK ${{ matrix.dotnet-version }}
6770 distribution : " corretto"
6871 java-version : 17
6972
73+ - name : Setup Python for running tests
74+ if : matrix.language == 'python'
75+ uses : actions/setup-python@v4
76+ with :
77+ python-version : 3.11
78+ architecture : x64
79+ - run : |
80+ python -m pip install --upgrade pip
81+ pip install --upgrade tox
82+ pip install poetry
83+
7084 - name : Setup Rust Toolchain for GitHub CI
7185 if : matrix.language == 'rust'
7286 uses : actions-rust-lang/setup-rust-toolchain@v1.10.1
@@ -88,13 +102,13 @@ jobs:
88102
89103 - name : Setup Dafny Rust
90104 if : matrix.language == 'rust'
91- uses : dafny-lang/setup-dafny-action@v1.8.0
105+ uses : ./mpl/.github/actions/setup_dafny
92106 with :
93107 dafny-version : nightly-2025-01-30-7db1e5f
94108
95109 - name : Setup Dafny Not Rust
96110 if : matrix.language != 'rust'
97- uses : dafny-lang/setup-dafny-action@v1.8.0
111+ uses : ./mpl/.github/actions/setup_dafny
98112 with :
99113 dafny-version : ${{ inputs.dafny }}
100114
@@ -144,6 +158,15 @@ jobs:
144158 CORES=$(node -e 'console.log(os.cpus().length)')
145159 make transpile_rust CORES=$CORES
146160
161+ - name : Build ${{ matrix.library }} implementation in Python
162+ if : matrix.language == 'python'
163+ shell : bash
164+ working-directory : ./${{ matrix.library }}
165+ run : |
166+ # This works because `node` is installed by default on GHA runners
167+ CORES=$(node -e 'console.log(os.cpus().length)')
168+ make transpile_python CORES=$CORES
169+
147170 - name : Build ${{ matrix.library }} implementation in Go
148171 if : matrix.language == 'go'
149172 shell : bash
@@ -162,20 +185,22 @@ jobs:
162185 make purge_polymorph_code
163186
164187 - name : Setup gradle
165- if : matrix.language == 'java'
188+ if : matrix.language == 'java_mkp' || matrix.language == ' java'
166189 uses : gradle/gradle-build-action@v2
167190 with :
168191 gradle-version : 7.2
169192
170- - name : Create Manifests
193+ - name : Create Keyring Manifests
171194 working-directory : ./${{ matrix.library }}
172- run : make test_generate_vectors_${{ matrix.language }}
195+ # Only MKP manifests will be written in the legacy format
196+ run : |
197+ make test_generate_vectors_${{ matrix.language }}
173198
174- - name : Create Encrypt Manifests
199+ - name : Create Keyring Encrypt Manifests
175200 working-directory : ./${{ matrix.library }}
176201 run : make test_encrypt_vectors_${{ matrix.language }}
177202
178- - name : Upload Encrypt Manifest and keys.json files
203+ - name : Upload Keyring Encrypt Manifest and keys.json files
179204 uses : actions/upload-artifact@v4
180205 with :
181206 name : ${{matrix.os}}_vector_artifact_${{matrix.language}}_${{github.sha}}
@@ -185,18 +210,18 @@ jobs:
185210 ./${{matrix.library}}/runtimes/${{matrix.language}}/ciphertexts
186211
187212 testInteroperablity :
188- needs : generateEncryptVectors
213+ needs : generateKeyringEncryptVectors
189214 strategy :
215+ fail-fast : false
190216 matrix :
191217 library : [TestVectors]
192218 os : [
193219 # https://taskei.amazon.dev/tasks/CrypTool-5283
194220 # windows-latest,
195221 ubuntu-22.04,
196- macos-13,
197222 ]
198- encrypting_language : [java, net, rust, go]
199- decrypting_language : [java, net, rust, go]
223+ encrypting_language : [java, net, rust, python, go]
224+ decrypting_language : [java, net, rust, python, go]
200225 # https://taskei.amazon.dev/tasks/CrypTool-5284
201226 dotnet-version : ["6.0.x"]
202227 runs-on : ${{ matrix.os }}
@@ -216,12 +241,11 @@ jobs:
216241 aws-region : us-west-2
217242 role-to-assume : arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
218243 role-session-name : InterOpTests
244+ role-duration-seconds : 3600
219245
220- - uses : actions/checkout@v3
221- # Not all submodules are needed.
222- # We manually pull the submodule we DO need.
223- - run : git submodule update --init libraries
224- - run : git submodule update --init --recursive mpl
246+ - uses : actions/checkout@v4
247+ with :
248+ submodules : " recursive"
225249
226250 # Set up runtimes
227251 - name : Setup .NET Core SDK ${{ matrix.dotnet-version }}
@@ -238,6 +262,17 @@ jobs:
238262 distribution : " corretto"
239263 java-version : 17
240264
265+ - name : Setup Python for running tests
266+ if : matrix.decrypting_language == 'python'
267+ uses : actions/setup-python@v4
268+ with :
269+ python-version : 3.11
270+ architecture : x64
271+ - run : |
272+ python -m pip install --upgrade pip
273+ pip install --upgrade tox
274+ pip install poetry
275+
241276 - name : Setup Rust Toolchain for GitHub CI
242277 if : matrix.decrypting_language == 'rust'
243278 uses : actions-rust-lang/setup-rust-toolchain@v1.10.1
@@ -259,13 +294,13 @@ jobs:
259294
260295 - name : Setup Dafny Rust
261296 if : matrix.decrypting_language == 'rust'
262- uses : dafny-lang/setup-dafny-action@v1.8.0
297+ uses : ./mpl/.github/actions/setup_dafny
263298 with :
264299 dafny-version : nightly-2025-01-30-7db1e5f
265300
266301 - name : Setup Dafny Not Rust
267302 if : matrix.decrypting_language != 'rust'
268- uses : dafny-lang/setup-dafny-action@v1.8.0
303+ uses : ./mpl/.github/actions/setup_dafny
269304 with :
270305 dafny-version : ${{ inputs.dafny }}
271306
@@ -332,6 +367,14 @@ jobs:
332367 run : |
333368 make purge_polymorph_code
334369
370+ - name : Build ${{ matrix.library }} implementation in Python
371+ if : matrix.decrypting_language == 'python'
372+ shell : bash
373+ working-directory : ./${{ matrix.library }}
374+ run : |
375+ CORES=$(node -e 'console.log(os.cpus().length)')
376+ make transpile_python CORES=$CORES
377+
335378 - name : Download Encrypt Manifest Artifact
336379 uses : actions/download-artifact@v4
337380 with :
0 commit comments