Skip to content

Commit f5f8718

Browse files
authored
chore: let interop testing launch N tasks instead of N^2 (#789)
1 parent f39702b commit f5f8718

File tree

3 files changed

+288
-4
lines changed

3 files changed

+288
-4
lines changed

.github/workflows/library_interop_keyring_test_vectors.yml

Lines changed: 160 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ jobs:
311311
# windows-latest,
312312
ubuntu-22.04,
313313
]
314-
encrypting_language: [java, net, rust, python, go, c]
315314
decrypting_language: [java, net, rust, python, go, c]
316315
# https://taskei.amazon.dev/tasks/CrypTool-5284
317316
dotnet-version: ["6.0.x"]
@@ -549,10 +548,169 @@ jobs:
549548
CORES=$(node -e 'console.log(os.cpus().length)')
550549
make transpile_python CORES=$CORES
551550
551+
# TestVectors will call KMS
552+
- name: Configure AWS Credentials
553+
uses: aws-actions/configure-aws-credentials@v2
554+
with:
555+
aws-region: us-west-2
556+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
557+
role-session-name: InterOpTests
558+
role-duration-seconds: 7200
559+
560+
- name: Download Encrypt Manifest Artifact
561+
uses: actions/download-artifact@v4
562+
with:
563+
name: ${{matrix.os}}_vector_artifact_java_${{github.sha}}
564+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
565+
566+
- name: Decrypt Encrypt Manifest
567+
if: matrix.decrypting_language != 'c'
568+
working-directory: ./${{ matrix.library }}
569+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
570+
571+
- name: Decrypt Encrypt Manifest
572+
if: matrix.decrypting_language == 'c' && matrix.os == 'ubuntu-22.04'
573+
working-directory: ./${{ matrix.library }}
574+
run: make test_decrypt_encrypt_vectors_c_unix
575+
576+
- name: Decrypt Encrypt Manifest
577+
if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04'
578+
working-directory: ./${{ matrix.library }}
579+
run: make test_decrypt_encrypt_vectors_c_mac
580+
581+
# TestVectors will call KMS
582+
- name: Configure AWS Credentials
583+
uses: aws-actions/configure-aws-credentials@v2
584+
with:
585+
aws-region: us-west-2
586+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
587+
role-session-name: InterOpTests
588+
role-duration-seconds: 7200
589+
590+
- name: Download Encrypt Manifest Artifact
591+
uses: actions/download-artifact@v4
592+
with:
593+
name: ${{matrix.os}}_vector_artifact_net_${{github.sha}}
594+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
595+
596+
- name: Decrypt Encrypt Manifest
597+
if: matrix.decrypting_language != 'c'
598+
working-directory: ./${{ matrix.library }}
599+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
600+
601+
- name: Decrypt Encrypt Manifest
602+
if: matrix.decrypting_language == 'c' && matrix.os == 'ubuntu-22.04'
603+
working-directory: ./${{ matrix.library }}
604+
run: make test_decrypt_encrypt_vectors_c_unix
605+
606+
- name: Decrypt Encrypt Manifest
607+
if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04'
608+
working-directory: ./${{ matrix.library }}
609+
run: make test_decrypt_encrypt_vectors_c_mac
610+
611+
# TestVectors will call KMS
612+
- name: Configure AWS Credentials
613+
uses: aws-actions/configure-aws-credentials@v2
614+
with:
615+
aws-region: us-west-2
616+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
617+
role-session-name: InterOpTests
618+
role-duration-seconds: 7200
619+
620+
- name: Download Encrypt Manifest Artifact
621+
uses: actions/download-artifact@v4
622+
with:
623+
name: ${{matrix.os}}_vector_artifact_rust_${{github.sha}}
624+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
625+
626+
- name: Decrypt Encrypt Manifest
627+
if: matrix.decrypting_language != 'c'
628+
working-directory: ./${{ matrix.library }}
629+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
630+
631+
- name: Decrypt Encrypt Manifest
632+
if: matrix.decrypting_language == 'c' && matrix.os == 'ubuntu-22.04'
633+
working-directory: ./${{ matrix.library }}
634+
run: make test_decrypt_encrypt_vectors_c_unix
635+
636+
- name: Decrypt Encrypt Manifest
637+
if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04'
638+
working-directory: ./${{ matrix.library }}
639+
run: make test_decrypt_encrypt_vectors_c_mac
640+
641+
# TestVectors will call KMS
642+
- name: Configure AWS Credentials
643+
uses: aws-actions/configure-aws-credentials@v2
644+
with:
645+
aws-region: us-west-2
646+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
647+
role-session-name: InterOpTests
648+
role-duration-seconds: 7200
649+
650+
- name: Download Encrypt Manifest Artifact
651+
uses: actions/download-artifact@v4
652+
with:
653+
name: ${{matrix.os}}_vector_artifact_python_${{github.sha}}
654+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
655+
656+
- name: Decrypt Encrypt Manifest
657+
if: matrix.decrypting_language != 'c'
658+
working-directory: ./${{ matrix.library }}
659+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
660+
661+
- name: Decrypt Encrypt Manifest
662+
if: matrix.decrypting_language == 'c' && matrix.os == 'ubuntu-22.04'
663+
working-directory: ./${{ matrix.library }}
664+
run: make test_decrypt_encrypt_vectors_c_unix
665+
666+
- name: Decrypt Encrypt Manifest
667+
if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04'
668+
working-directory: ./${{ matrix.library }}
669+
run: make test_decrypt_encrypt_vectors_c_mac
670+
671+
# TestVectors will call KMS
672+
- name: Configure AWS Credentials
673+
uses: aws-actions/configure-aws-credentials@v2
674+
with:
675+
aws-region: us-west-2
676+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
677+
role-session-name: InterOpTests
678+
role-duration-seconds: 7200
679+
680+
- name: Download Encrypt Manifest Artifact
681+
uses: actions/download-artifact@v4
682+
with:
683+
name: ${{matrix.os}}_vector_artifact_go_${{github.sha}}
684+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
685+
686+
- name: Decrypt Encrypt Manifest
687+
if: matrix.decrypting_language != 'c'
688+
working-directory: ./${{ matrix.library }}
689+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
690+
691+
- name: Decrypt Encrypt Manifest
692+
if: matrix.decrypting_language == 'c' && matrix.os == 'ubuntu-22.04'
693+
working-directory: ./${{ matrix.library }}
694+
run: make test_decrypt_encrypt_vectors_c_unix
695+
696+
- name: Decrypt Encrypt Manifest
697+
if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04'
698+
working-directory: ./${{ matrix.library }}
699+
run: make test_decrypt_encrypt_vectors_c_mac
700+
701+
# TestVectors will call KMS
702+
- name: Configure AWS Credentials
703+
uses: aws-actions/configure-aws-credentials@v2
704+
with:
705+
aws-region: us-west-2
706+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
707+
role-session-name: InterOpTests
708+
role-duration-seconds: 7200
709+
552710
- name: Download Encrypt Manifest Artifact
553711
uses: actions/download-artifact@v4
554712
with:
555-
name: ${{matrix.os}}_vector_artifact_${{matrix.encrypting_language}}_${{github.sha}}
713+
name: ${{matrix.os}}_vector_artifact_c_${{github.sha}}
556714
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
557715

558716
- name: Decrypt Encrypt Manifest

.github/workflows/library_interop_mkp_test_vectors.yml

Lines changed: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ jobs:
246246
# windows-latest,
247247
ubuntu-22.04,
248248
]
249-
encrypting_language: [java, net, rust, python, python_mkp, java_mkp, go]
250249
decrypting_language: [java, net, rust, python, python_mkp, java_mkp, go]
251250
# https://taskei.amazon.dev/tasks/CrypTool-5284
252251
dotnet-version: ["6.0.x"]
@@ -404,10 +403,133 @@ jobs:
404403
CORES=$(node -e 'console.log(os.cpus().length)')
405404
make transpile_python CORES=$CORES
406405
406+
# TestVectors will call KMS
407+
- name: Configure AWS Credentials
408+
uses: aws-actions/configure-aws-credentials@v2
409+
with:
410+
aws-region: us-west-2
411+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
412+
role-session-name: InterOpTests
413+
role-duration-seconds: 3600
414+
407415
- name: Download Encrypt Manifest Artifact
408416
uses: actions/download-artifact@v4
409417
with:
410-
name: ${{matrix.os}}_vector_artifact_${{matrix.encrypting_language}}_legacy_format_${{github.sha}}
418+
name: ${{matrix.os}}_vector_artifact_java_legacy_format_${{github.sha}}
419+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
420+
421+
- name: Decrypt Encrypt Manifest
422+
working-directory: ./${{ matrix.library }}
423+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
424+
425+
# TestVectors will call KMS
426+
- name: Configure AWS Credentials
427+
uses: aws-actions/configure-aws-credentials@v2
428+
with:
429+
aws-region: us-west-2
430+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
431+
role-session-name: InterOpTests
432+
role-duration-seconds: 3600
433+
434+
- name: Download Encrypt Manifest Artifact
435+
uses: actions/download-artifact@v4
436+
with:
437+
name: ${{matrix.os}}_vector_artifact_net_legacy_format_${{github.sha}}
438+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
439+
440+
- name: Decrypt Encrypt Manifest
441+
working-directory: ./${{ matrix.library }}
442+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
443+
444+
# TestVectors will call KMS
445+
- name: Configure AWS Credentials
446+
uses: aws-actions/configure-aws-credentials@v2
447+
with:
448+
aws-region: us-west-2
449+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
450+
role-session-name: InterOpTests
451+
role-duration-seconds: 3600
452+
453+
- name: Download Encrypt Manifest Artifact
454+
uses: actions/download-artifact@v4
455+
with:
456+
name: ${{matrix.os}}_vector_artifact_rust_legacy_format_${{github.sha}}
457+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
458+
459+
- name: Decrypt Encrypt Manifest
460+
working-directory: ./${{ matrix.library }}
461+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
462+
463+
# TestVectors will call KMS
464+
- name: Configure AWS Credentials
465+
uses: aws-actions/configure-aws-credentials@v2
466+
with:
467+
aws-region: us-west-2
468+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
469+
role-session-name: InterOpTests
470+
role-duration-seconds: 3600
471+
472+
- name: Download Encrypt Manifest Artifact
473+
uses: actions/download-artifact@v4
474+
with:
475+
name: ${{matrix.os}}_vector_artifact_python_legacy_format_${{github.sha}}
476+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
477+
478+
- name: Decrypt Encrypt Manifest
479+
working-directory: ./${{ matrix.library }}
480+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
481+
482+
# TestVectors will call KMS
483+
- name: Configure AWS Credentials
484+
uses: aws-actions/configure-aws-credentials@v2
485+
with:
486+
aws-region: us-west-2
487+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
488+
role-session-name: InterOpTests
489+
role-duration-seconds: 3600
490+
491+
- name: Download Encrypt Manifest Artifact
492+
uses: actions/download-artifact@v4
493+
with:
494+
name: ${{matrix.os}}_vector_artifact_python_mkp_legacy_format_${{github.sha}}
495+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
496+
497+
- name: Decrypt Encrypt Manifest
498+
working-directory: ./${{ matrix.library }}
499+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
500+
501+
# TestVectors will call KMS
502+
- name: Configure AWS Credentials
503+
uses: aws-actions/configure-aws-credentials@v2
504+
with:
505+
aws-region: us-west-2
506+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
507+
role-session-name: InterOpTests
508+
role-duration-seconds: 3600
509+
510+
- name: Download Encrypt Manifest Artifact
511+
uses: actions/download-artifact@v4
512+
with:
513+
name: ${{matrix.os}}_vector_artifact_java_mkp_legacy_format_${{github.sha}}
514+
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
515+
516+
- name: Decrypt Encrypt Manifest
517+
working-directory: ./${{ matrix.library }}
518+
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}}
519+
520+
# TestVectors will call KMS
521+
- name: Configure AWS Credentials
522+
uses: aws-actions/configure-aws-credentials@v2
523+
with:
524+
aws-region: us-west-2
525+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2
526+
role-session-name: InterOpTests
527+
role-duration-seconds: 3600
528+
529+
- name: Download Encrypt Manifest Artifact
530+
uses: actions/download-artifact@v4
531+
with:
532+
name: ${{matrix.os}}_vector_artifact_go_legacy_format_${{github.sha}}
411533
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}}
412534

413535
- name: Decrypt Encrypt Manifest

TestVectors/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ test_encrypt_vectors_c_mac: c_test_vectors
365365
rm -rf local; \
366366
mkdir -p local; \
367367
LD_LIBRARY_PATH=../../install/lib/ ./test_vectors encrypt --manifest-path ./from-dafny --decrypt-manifest-path ./local
368+
rm -rf ./runtimes/c/
368369
mkdir -p ./runtimes/c/
369370
cp aws-encryption-sdk-c/tests/TestVectors/local/*.json ./runtimes/c/
370371
mv ./runtimes/c/decrypt-manifest.json ./runtimes/c/manifest.json
@@ -376,6 +377,7 @@ test_encrypt_vectors_c_unix: c_test_vectors_unix
376377
rm -rf local; \
377378
mkdir -p local; \
378379
LD_LIBRARY_PATH=../../install/lib/ ./test_vectors encrypt --manifest-path ./from-dafny --decrypt-manifest-path ./local
380+
rm -rf ./runtimes/c/
379381
mkdir -p ./runtimes/c/
380382
pwd
381383
ls -l aws-encryption-sdk-c/tests/TestVectors/
@@ -386,6 +388,7 @@ test_encrypt_vectors_c_unix: c_test_vectors_unix
386388
cp -r aws-encryption-sdk-c/tests/TestVectors/local/ciphertexts/ ./runtimes/c/ciphertexts/
387389

388390
test_decrypt_encrypt_vectors_c_mac: c_test_vectors
391+
rm -rf aws-encryption-sdk-c/tests/TestVectors/local/
389392
mkdir -p aws-encryption-sdk-c/tests/TestVectors/local/
390393
cp ./runtimes/c/*.json aws-encryption-sdk-c/tests/TestVectors/local/
391394
cp -r ./runtimes/c/plaintexts/ aws-encryption-sdk-c/tests/TestVectors/local/plaintexts/
@@ -394,6 +397,7 @@ test_decrypt_encrypt_vectors_c_mac: c_test_vectors
394397
LD_LIBRARY_PATH=../../install/lib/ ./test_vectors decrypt --manifest-path ./local --manifest-name manifest.json
395398

396399
test_decrypt_encrypt_vectors_c_unix: c_test_vectors_unix
400+
rm -rf aws-encryption-sdk-c/tests/TestVectors/local/
397401
mkdir -p aws-encryption-sdk-c/tests/TestVectors/local/
398402
pwd
399403
ls -l ./runtimes/c/

0 commit comments

Comments
 (0)