Skip to content

Commit 694f609

Browse files
committed
chore(GHA): Run Java CI testing for MPL Latest Release
1 parent 510dde3 commit 694f609

File tree

7 files changed

+101
-12
lines changed

7 files changed

+101
-12
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is for testing that the latest released version
2+
# of the MPL is compatible with the current DB-ESDK Head
3+
name: Test Latest Released MPL Java with DB-ESDK HEAD
4+
5+
on:
6+
schedule:
7+
- cron: "00 16 * * 1-5"
8+
9+
jobs:
10+
getDBESDKDafnyVersion:
11+
# Don't run the cron builds on forks
12+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
13+
uses: ./.github/workflows/dafny_version.yml
14+
getVerifyDBESDKDafnyVersion:
15+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
16+
uses: ./.github/workflows/dafny_verify_version.yml
17+
getLatestReleaseMplVersion:
18+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
19+
uses: ./.github/workflows/mpl_latest_release_version.yml
20+
getMplDafnyVersion:
21+
needs: getLatestReleaseMplVersion
22+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
23+
uses: ./.github/workflows/mpl_head_version.yml
24+
with:
25+
mpl-head: ${{needs.getLatestReleaseMplVersion.outputs.version}}
26+
test-latest-released-mpl-java:
27+
needs: [getDafnyVersion, getLatestReleaseMplVersion, getMplDafnyVersion]
28+
uses: ./.github/workflows/dafny-interop.yml
29+
with:
30+
mpl-dafny: ${{needs.getLatestReleaseMplVersion.outputs.version}}
31+
mpl-commit: ${{needs.getMplDafnyVersion.outputs.dafnyVersion}}
32+
dbesdk-dafny: ${{needs.getDBESDKDafnyVersion.outputs.version}}

.github/workflows/dafny-interop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ jobs:
3131
with:
3232
mpl-dafny: ${{inputs.mpl-dafny}}
3333
mpl-commit: ${{inputs.mpl-commit}}
34-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
34+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
3535
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
3636
dafny-interop-java-test-vectors:
3737
needs: getMplHeadVersion
3838
uses: ./.github/workflows/dafny_interop_test_vector_java.yml
3939
with:
4040
mpl-dafny: ${{inputs.mpl-dafny}}
4141
mpl-commit: ${{inputs.mpl-commit}}
42-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
42+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
4343
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
4444
dafny-interop-java-examples:
4545
needs: getMplHeadVersion
4646
uses: ./.github/workflows/dafny_interop_examples_java.yml
4747
with:
4848
mpl-dafny: ${{inputs.mpl-dafny}}
4949
mpl-commit: ${{inputs.mpl-commit}}
50-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
50+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
5151
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
5252
dafny-interop-net:
5353
uses: ./.github/workflows/dafny_interop_test_net.yml

.github/workflows/mpl-head.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,35 @@ jobs:
3131
uses: ./.github/workflows/library_dafny_verification.yml
3232
with:
3333
dafny: ${{needs.getVerifyVersion.outputs.version}}
34-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
34+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
3535
mpl-head: true
3636
mpl-head-ci-test-vector-verification:
3737
needs: [getVerifyVersion, getMplHeadVersion]
3838
uses: ./.github/workflows/test_vector_verification.yml
3939
with:
4040
dafny: ${{needs.getVerifyVersion.outputs.version}}
41-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
41+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
4242
mpl-head: true
4343
mpl-head-ci-java:
4444
needs: [getVersion, getMplHeadVersion]
4545
uses: ./.github/workflows/ci_test_java.yml
4646
with:
4747
dafny: ${{needs.getVersion.outputs.version}}
48-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
48+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
4949
mpl-head: true
5050
mpl-head-ci-java-test-vectors:
5151
needs: [getVersion, getMplHeadVersion]
5252
uses: ./.github/workflows/ci_test_vector_java.yml
5353
with:
5454
dafny: ${{needs.getVersion.outputs.version}}
55-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
55+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
5656
mpl-head: true
5757
mpl-head-ci-java-examples:
5858
needs: [getVersion, getMplHeadVersion]
5959
uses: ./.github/workflows/ci_examples_java.yml
6060
with:
6161
dafny: ${{needs.getVersion.outputs.version}}
62-
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
62+
mpl-version: ${{needs.getMplHeadVersion.outputs.mplVersion}}
6363
mpl-head: true
6464
mpl-head-ci-net:
6565
needs: getVersion

.github/workflows/mpl_head_version.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ on:
1212
default: main
1313
type: string
1414
outputs:
15-
version:
16-
description: "The dafny version for verify"
15+
mplVersion:
16+
description: "The MPL version"
1717
value: ${{ jobs.getMplHeadVersion.outputs.version }}
18+
dafnyVersion:
19+
description: "The dafny version for the MPL"
20+
value: ${{ jobs.getMplHeadDafnyVersion.outputs.version }}
1821

1922
jobs:
2023
getMplHeadVersion:
@@ -40,3 +43,29 @@ jobs:
4043
with:
4144
path: "submodules/MaterialProviders/project.properties"
4245
properties: "mplVersion"
46+
47+
getMplHeadDafnyVersion:
48+
runs-on: ubuntu-22.04
49+
outputs:
50+
version: ${{ steps.read_property.outputs.dafnyVersion }}
51+
steps:
52+
- uses: actions/checkout@v4
53+
with:
54+
submodules: recursive
55+
fetch-depth: 0
56+
- name: Update MPL submodule locally if requested
57+
working-directory: submodules/MaterialProviders
58+
shell: bash
59+
run: |
60+
git checkout ${{inputs.mpl-head}}
61+
git submodule update --init --recursive
62+
git rev-parse HEAD
63+
64+
- name: Get the MPL version from the MPL submodule
65+
id: read_property
66+
uses: christian-draeger/[email protected]
67+
with:
68+
path: "submodules/MaterialProviders/project.properties"
69+
properties: "dafnyVersion"
70+
71+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow reads the project.properties
2+
# into the environment variables
3+
# and then creates an output variable for `mplDependencyJavaLatestReleaseVersionTag`
4+
name: Latest Released MPL Version
5+
6+
on:
7+
workflow_call:
8+
outputs:
9+
version:
10+
description: "The latest released MPL version"
11+
value: ${{ jobs.getMPLVersion.outputs.version }}
12+
13+
jobs:
14+
getMPLVersion:
15+
runs-on: ubuntu-22.04
16+
outputs:
17+
version: ${{ steps.read_property.outputs.mplDependencyJavaLatestReleaseVersionTag }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Read version from Properties-file
21+
id: read_property
22+
uses: christian-draeger/[email protected]
23+
with:
24+
path: "./project.properties"
25+
properties: "mplDependencyJavaLatestReleaseVersionTag"

codebuild/staging/release-staging.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ phases:
4747
- aws sts get-caller-identity
4848
build:
4949
commands:
50-
# Validate the MPL submodule points to the correct release
51-
- scripts/validate-mpl-submodule.sh
5250
# Build and deploy to maven local
5351
- cd DynamoDbEncryption/
5452
- make transpile_implementation_java

project.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ dafnyVersion=4.9.0
44
dafnyVerifyVersion=4.9.0
55
dafnyRuntimeJavaVersion=4.9.0
66
smithyDafnyJavaConversionVersion=0.1.1
7+
# mplDependencyJavaLatestReleaseVersionTag is used in ci_test_latest_released_mpl_java.yml
8+
# to test whether the HEAD of DB_ESDK is compatible with the latest released version of
9+
# the MPL or not.
10+
# Add here the tag of the latest released MPL version, for instance, v1.8.0
11+
mplDependencyJavaLatestReleaseVersionTag="v1.8.0"

0 commit comments

Comments
 (0)