Skip to content

Commit

Permalink
Merge branch 'main' into rishav/go/localCMCTest
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-karanjit authored Jan 21, 2025
2 parents 435c3d9 + 7289449 commit b88fa77
Show file tree
Hide file tree
Showing 111 changed files with 60,167 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
require-approvals:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_dafny_runtime_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
check-version-consistency:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_only_keyword.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
grep-only-verification-keyword:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
not-grep:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: not-grep
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dafny_verify_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
getDafnyVerifyVersion:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyVerifyVersion }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dafny_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
getDafnyVersion:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyVersion }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/duvet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
duvet:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# This environment stores a token
# that can be used to checkout
# the ESDK specification
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# The workflow installs black and docformatter and runs them on generated code.
python-version: [3.11]
go-version: [1.23]
os: [ubuntu-latest]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/library_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
TestVectorsAwsCryptographicMaterialProviders,
StandardLibrary,
]
os: [ubuntu-latest]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
format_java_misc:
# Don't run the nightly build on forks
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Support longpaths
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_go_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Note: only tests use the sys.path workaround, not source code.
# Windows source code is tested downstream (ex. ESDK-Python CI).
# windows-latest,
ubuntu-latest,
ubuntu-22.04,
macos-13,
]
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/library_interop_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
os: [
# https://taskei.amazon.dev/tasks/CrypTool-5283
# windows-latest,
ubuntu-latest,
ubuntu-22.04,
macos-13,
]
language: [java, net, python, rust, go]
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
os: [
# TODO just test on mac and ubuntu for now
# windows-latest,
ubuntu-latest,
ubuntu-22.04,
macos-13,
]
encrypting_language: [java, net, python, rust, go]
Expand Down
96 changes: 12 additions & 84 deletions .github/workflows/library_java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ jobs:
strategy:
fail-fast: false
matrix:
library:
[
library: [
AwsCryptographyPrimitives,
ComAmazonawsKms,
ComAmazonawsDynamodb,
AwsCryptographicMaterialProviders,
TestVectorsAwsCryptographicMaterialProviders,
# TestVectorsAwsCryptographicMaterialProviders,
StandardLibrary,
]
os: [
# TODO just test on mac for now
# windows-latest,
ubuntu-latest,
ubuntu-22.04,
macos-13,
]
java-versions: [8, 11, 16, 17]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand Down Expand Up @@ -73,17 +73,17 @@ jobs:
library: ${{ matrix.library }}
diff-generated-code: false

- name: Copy over keys.json so that it is discoverable by the tests
uses: gradle/gradle-build-action@v2
with:
arguments: copyKeysJSON
build-root-directory: ./TestVectorsAwsCryptographicMaterialProviders/runtimes/java
# - name: Copy over keys.json so that it is discoverable by the tests
# uses: gradle/gradle-build-action@v2
# with:
# arguments: copyKeysJSON
# build-root-directory: ./TestVectorsAwsCryptographicMaterialProviders/runtimes/java

- name: Setup Java 8
- name: Setup Java ${{matrix.java-versions}}
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: 8
java-version: ${{matrix.java-versions}}

- name: Build ${{ matrix.library }} implementation
working-directory: ./${{ matrix.library }}
Expand All @@ -92,79 +92,7 @@ jobs:
CORES=$(node -e 'console.log(os.cpus().length)')
make build_java CORES=$CORES
- name: Test ${{ matrix.library }}
- name: Test ${{ matrix.library }} on ${{matrix.java-versions}}
working-directory: ./${{ matrix.library }}
run: |
make test_java
- name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: 11

- name: Clean for next Java
uses: gradle/gradle-build-action@v3
with:
arguments: clean
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Compile Java 11
uses: gradle/gradle-build-action@v3
with:
arguments: build
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Test Java 11
uses: gradle/gradle-build-action@v3
with:
arguments: runTests
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Setup Java 16
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: 16

- name: Clean for next Java
uses: gradle/gradle-build-action@v3
with:
arguments: clean
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Compile Java 16
uses: gradle/gradle-build-action@v3
with:
arguments: build
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Test Java 16
uses: gradle/gradle-build-action@v3
with:
arguments: runTests
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: 17

- name: Clean for next Java
uses: gradle/gradle-build-action@v3
with:
arguments: clean
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Compile Java 17
uses: gradle/gradle-build-action@v3
with:
arguments: build
build-root-directory: ./${{ matrix.library }}/runtimes/java

- name: Test Java 17
uses: gradle/gradle-build-action@v3
with:
arguments: runTests
build-root-directory: ./${{ matrix.library }}/runtimes/java
2 changes: 1 addition & 1 deletion .github/workflows/library_net_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
TestVectorsAwsCryptographicMaterialProviders,
]
dotnet-version: ["6.0.x"]
os: [windows-latest, ubuntu-latest, macos-13]
os: [windows-latest, ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Note: only tests use the sys.path workaround, not source code.
# Windows source code is tested downstream (ex. ESDK-Python CI).
# windows-latest,
ubuntu-latest,
ubuntu-22.04,
macos-13,
]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_rust_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
TestVectorsAwsCryptographicMaterialProviders,
]
# removed windows-latest because somehow it can't build aws-lc in CI
os: [ubuntu-latest, macos-13]
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_dafny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
dafny: ${{needs.getVersion.outputs.version}}

cut-issue-on-failure:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ jobs:
- pr-ci-verification
- pr-ci-java
- pr-ci-net
- pr-ci-python
- pr-ci-go
- pr-ci-rust
- pr-interop-test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Verify all required jobs passed
uses: re-actors/alls-green@release/v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
cleanup:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Stale issue job
steps:
- uses: aws-actions/stale-issue-cleanup@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,26 @@ def aws_cryptography_keystore_BeaconKeyMaterials(native_input):
)


def aws_cryptography_keystore_DdbClientReference(native_input):
import aws_cryptography_internal_dynamodb.internaldafny.generated.Com_Amazonaws_Dynamodb

client = aws_cryptography_internal_dynamodb.internaldafny.generated.Com_Amazonaws_Dynamodb.default__.DynamoDBClient(
boto_client=native_input
)
client.value.impl = native_input
return client.value


def aws_cryptography_keystore_KmsClientReference(native_input):
import aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms

client = aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__.KMSClient(
boto_client=native_input
)
client.value.impl = native_input
return client.value


def aws_cryptography_keystore_KeyStoreConfig(native_input):
return DafnyKeyStoreConfig(
ddbTableName=Seq(
Expand Down Expand Up @@ -542,23 +562,3 @@ def aws_cryptography_keystore_KeyStoreConfig(native_input):
else (Option_None())
),
)


def aws_cryptography_keystore_DdbClientReference(native_input):
import aws_cryptography_internal_dynamodb.internaldafny.generated.Com_Amazonaws_Dynamodb

client = aws_cryptography_internal_dynamodb.internaldafny.generated.Com_Amazonaws_Dynamodb.default__.DynamoDBClient(
boto_client=native_input
)
client.value.impl = native_input
return client.value


def aws_cryptography_keystore_KmsClientReference(native_input):
import aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms

client = aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__.KMSClient(
boto_client=native_input
)
client.value.impl = native_input
return client.value
Loading

0 comments on commit b88fa77

Please sign in to comment.