-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15377f3
commit 6d453b3
Showing
3 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,7 @@ jobs: | |
CORES=$(node -e 'console.log(os.cpus().length)') | ||
make transpile_net | ||
make write_correct_main_net | ||
- name: Setup gradle | ||
if: matrix.language == 'java' | ||
uses: gradle/gradle-build-action@v2 | ||
|
@@ -103,12 +104,117 @@ jobs: | |
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 | ||
role-session-name: NetTests | ||
role-session-name: InterOpTests | ||
|
||
- name: Create Manifests | ||
working-directory: ./${{ matrix.library }} | ||
run: make test_generate_vectors_${{ matrix.language }} | ||
|
||
- name: Create Encrypt Manifests | ||
working-directory: ./${{ matrix.library }} | ||
run: make test_encrypt_vectors_${{ matrix.language }} | ||
run: make test_encrypt_vectors_${{ matrix.language }} | ||
|
||
- name: Upload Encrypt Manifest and keys.json files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{matrix.os}}_vector_artifact_${{matrix.language}} | ||
path: | | ||
./${{matrix.library}}/runtimes/${{matrix.language}}/*.json | ||
./${{matrix.library}}/runtimes/${{matrix.language}}/plaintexts | ||
./${{matrix.library}}/runtimes/${{matrix.language}}/ciphertexts | ||
testInteroperablity: | ||
needs: generateEncryptVectors | ||
strategy: | ||
matrix: | ||
library: [TestVectors] | ||
os: [ | ||
# https://taskei.amazon.dev/tasks/CrypTool-5283 | ||
# windows-latest, | ||
ubuntu-latest, | ||
macos-12, | ||
] | ||
language: [java, net] | ||
# https://taskei.amazon.dev/tasks/CrypTool-5284 | ||
dotnet-version: ["6.0.x"] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Support longpaths on Git checkout | ||
run: | | ||
git config --global core.longpaths true | ||
# TestVectors will call KMS | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 | ||
role-session-name: InterOpTests | ||
|
||
- uses: actions/checkout@v3 | ||
# Not all submodules are needed. | ||
# We manually pull the submodule we DO need. | ||
- run: git submodule update --init libraries | ||
- run: git submodule update --init --recursive mpl | ||
|
||
# Set up runtimes | ||
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | ||
if: matrix.decrypting_language == 'net' | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
- name: Setup Java 17 | ||
if: matrix.decrypting_language == 'java' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: 17 | ||
|
||
- name: Setup Dafny | ||
uses: dafny-lang/[email protected] | ||
with: | ||
dafny-version: ${{ inputs.dafny }} | ||
|
||
- name: Regenerate code using smithy-dafny if necessary | ||
if: ${{ inputs.regenerate-code }} | ||
uses: ./.github/actions/polymorph_codegen | ||
with: | ||
dafny: ${{ inputs.dafny }} | ||
library: ${{ matrix.library }} | ||
diff-generated-code: false | ||
|
||
# Build implementation for each runtime | ||
- name: Build ${{ matrix.library }} implementation in Java | ||
if: matrix.language == 'java' | ||
shell: bash | ||
working-directory: ./${{ matrix.library }} | ||
run: | | ||
# This works because `node` is installed by default on GHA runners | ||
CORES=$(node -e 'console.log(os.cpus().length)') | ||
make build_java CORES=$CORES | ||
make write_correct_main_java | ||
- name: Build ${{ matrix.library }} implementation in .NET | ||
if: matrix.language == 'net' | ||
shell: bash | ||
working-directory: ./${{ matrix.library }} | ||
run: | | ||
# This works because `node` is installed by default on GHA runners | ||
CORES=$(node -e 'console.log(os.cpus().length)') | ||
make transpile_net | ||
make write_correct_main_net | ||
- name: Download Encrypt Manifest Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{matrix.os}}_vector_artifact_${{matrix.encrypting_language}} | ||
path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} | ||
|
||
- name: Decrypt Encrypt Manifest | ||
working-directory: ./${{ matrix.library }} | ||
run: make test_decrypt_encrypt_vectors_${{matrix.decrypting_language}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters