Skip to content

Commit 8bec538

Browse files
authored
chore(GHA): update nightlies for interop and interop action (#1287)
1 parent 5a1c921 commit 8bec538

8 files changed

+588
-33
lines changed

.github/workflows/dafny-interop.yml

+30-30
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,33 @@ jobs:
2727
mpl-dafny: ${{inputs.mpl-dafny}}
2828
mpl-commit: ${{inputs.mpl-commit}}
2929
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
30-
# dafny-interop-java-test-vectors:
31-
# uses: ./.github/workflows/ci_test_vector_java.yml
32-
# with:
33-
# mpl-dafny: ${{inputs.mpl-dafny}}
34-
# mpl-commit: ${{inputs.mpl-commit}}
35-
# dbsesdk-dafny: ${{inputs.dbesdk-dafny}}
36-
# dafny-interop-java-examples:
37-
# uses: ./.github/workflows/ci_examples_java.yml
38-
# with:
39-
# mpl-dafny: ${{inputs.mpl-dafny}}
40-
# mpl-commit: ${{inputs.mpl-commit}}
41-
# dbsesdk-dafny: ${{inputs.dbesdk-dafny}}
42-
# dafny-interop-net:
43-
# uses: ./.github/workflows/ci_test_net.yml
44-
# with:
45-
# mpl-dafny: ${{inputs.mpl-dafny}}
46-
# mpl-commit: ${{inputs.mpl-commit}}
47-
# dbsesdk-dafny: ${{inputs.dbesdk-dafny}}
48-
# dafny-interop-net-test-vectors:
49-
# uses: ./.github/workflows/ci_test_vector_net.yml
50-
# with:
51-
# mpl-dafny: ${{inputs.mpl-dafny}}
52-
# mpl-commit: ${{inputs.mpl-commit}}
53-
# dbsesdk-dafny: ${{inputs.dbesdk-dafny}}
54-
# dafny-interop-net-examples:
55-
# uses: ./.github/workflows/ci_examples_net.yml
56-
# with:
57-
# mpl-dafny: ${{inputs.mpl-dafny}}
58-
# mpl-commit: ${{inputs.mpl-commit}}
59-
# dbsesdk-dafny: ${{inputs.dbesdk-dafny}}
30+
dafny-interop-java-test-vectors:
31+
uses: ./.github/workflows/dafny_interop_test_vector_java.yml
32+
with:
33+
mpl-dafny: ${{inputs.mpl-dafny}}
34+
mpl-commit: ${{inputs.mpl-commit}}
35+
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
36+
dafny-interop-java-examples:
37+
uses: ./.github/workflows/dafny_interop_examples_java.yml
38+
with:
39+
mpl-dafny: ${{inputs.mpl-dafny}}
40+
mpl-commit: ${{inputs.mpl-commit}}
41+
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
42+
dafny-interop-net:
43+
uses: ./.github/workflows/dafny_interop_test_net.yml
44+
with:
45+
mpl-dafny: ${{inputs.mpl-dafny}}
46+
mpl-commit: ${{inputs.mpl-commit}}
47+
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
48+
dafny-interop-net-test-vectors:
49+
uses: ./.github/workflows/dafny_interop_test_vector_net.yml
50+
with:
51+
mpl-dafny: ${{inputs.mpl-dafny}}
52+
mpl-commit: ${{inputs.mpl-commit}}
53+
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
54+
dafny-interop-net-examples:
55+
uses: ./.github/workflows/dafny_interop_examples_net.yml
56+
with:
57+
mpl-dafny: ${{inputs.mpl-dafny}}
58+
mpl-commit: ${{inputs.mpl-commit}}
59+
dbesdk-dafny: ${{inputs.dbesdk-dafny}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# This workflow performs tests in Java with MPL nightly latest.
2+
name: Library Java Backwards Example Tests
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
mpl-dafny:
8+
description: "The Dafny version to compile the MPL with (4.2.0, dafny-nightly, etc..)"
9+
required: true
10+
type: string
11+
mpl-commit:
12+
description: "The MPL commit to use"
13+
required: false
14+
default: "main"
15+
type: string
16+
dbesdk-dafny:
17+
description: "The Dafny version to compile the DBESDK with (4.2.0, dafny-nightly, etc..)"
18+
required: true
19+
type: string
20+
21+
jobs:
22+
testExamplesJava:
23+
strategy:
24+
max-parallel: 1
25+
matrix:
26+
java-version: [8, 11, 16, 17]
27+
os: [macos-12]
28+
runs-on: ${{ matrix.os }}
29+
permissions:
30+
id-token: write
31+
contents: read
32+
steps:
33+
- name: Configure AWS Credentials
34+
uses: aws-actions/configure-aws-credentials@v4
35+
with:
36+
aws-region: us-west-2
37+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2
38+
role-session-name: DDBEC-Dafny-Java-Tests
39+
40+
- uses: actions/checkout@v3
41+
with:
42+
submodules: recursive
43+
fetch-depth: 0
44+
45+
- name: Setup MPL Dafny
46+
uses: dafny-lang/setup-dafny-action@v1.7.2
47+
with:
48+
dafny-version: ${{ inputs.mpl-dafny }}
49+
50+
- name: Update MPL submodule
51+
working-directory: submodules/MaterialProviders
52+
run: |
53+
git fetch
54+
git checkout ${{inputs.mpl-commit}}
55+
git pull
56+
git submodule update --init --recursive
57+
git rev-parse HEAD
58+
59+
- name: Setup Java ${{ matrix.java-version }}
60+
uses: actions/setup-java@v4
61+
with:
62+
distribution: "corretto"
63+
java-version: ${{ matrix.java-version }}
64+
65+
- name: Build MPL with Dafny ${{inputs.mpl-dafny}}
66+
working-directory: submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders
67+
run: |
68+
# This works because `node` is installed by default on GHA runners
69+
CORES=$(node -e 'console.log(os.cpus().length)')
70+
make build_java CORES=$CORES
71+
72+
- name: Setup DBESDK Dafny
73+
uses: dafny-lang/setup-dafny-action@v1.7.2
74+
with:
75+
dafny-version: ${{ inputs.dbesdk-dafny}}
76+
77+
- name: Build implementation
78+
shell: bash
79+
working-directory: ./DynamoDbEncryption
80+
run: |
81+
make transpile_implementation_java
82+
make transpile_test_java
83+
make mvn_local_deploy
84+
85+
- name: Test Examples
86+
working-directory: ./Examples
87+
run: |
88+
# Run simple examples
89+
gradle -p runtimes/java/DynamoDbEncryption test
90+
# Run migration examples
91+
gradle -p runtimes/java/Migration/PlaintextToAWSDBE test
92+
gradle -p runtimes/java/Migration/DDBECToAWSDBE test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# This workflow performs tests in DotNet with MPL nightly latest.
2+
name: Library DotNet Backwards Interop Example Tests
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
mpl-dafny:
8+
description: "The Dafny version to compile the MPL with (4.2.0, dafny-nightly, etc..)"
9+
required: true
10+
type: string
11+
mpl-commit:
12+
description: "The MPL commit to use"
13+
required: false
14+
default: "main"
15+
type: string
16+
dbesdk-dafny:
17+
description: "The Dafny version to compile the DBESDK with (4.2.0, dafny-nightly, etc..)"
18+
required: true
19+
type: string
20+
21+
jobs:
22+
dotNetExamples:
23+
strategy:
24+
matrix:
25+
library: [DynamoDbEncryption]
26+
dotnet-version: ["6.0.x"]
27+
os: [macos-12]
28+
runs-on: ${{ matrix.os }}
29+
permissions:
30+
id-token: write
31+
contents: read
32+
env:
33+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
34+
DOTNET_NOLOGO: 1
35+
steps:
36+
- name: Support longpaths on Git checkout
37+
run: |
38+
git config --global core.longpaths true
39+
- uses: actions/checkout@v3
40+
with:
41+
submodules: recursive
42+
fetch-depth: 0
43+
44+
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
45+
uses: actions/setup-dotnet@v4
46+
with:
47+
dotnet-version: ${{ matrix.dotnet-version }}
48+
49+
- name: Setup MPL Dafny
50+
uses: dafny-lang/setup-dafny-action@v1.7.2
51+
with:
52+
dafny-version: ${{ inputs.mpl-dafny }}
53+
54+
- name: Update MPL submodule
55+
working-directory: submodules/MaterialProviders
56+
run: |
57+
git fetch
58+
git checkout ${{inputs.mpl-commit}}
59+
git pull
60+
git submodule update --init --recursive
61+
git rev-parse HEAD
62+
63+
- name: Download Dependencies
64+
working-directory: ./${{ matrix.library }}
65+
run: make setup_net
66+
67+
- name: Configure AWS Credentials
68+
uses: aws-actions/configure-aws-credentials@v4
69+
with:
70+
aws-region: us-west-2
71+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2
72+
role-session-name: DDBEC-Dafny-Net-Tests
73+
74+
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
75+
shell: bash
76+
working-directory: submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders
77+
run: |
78+
make setup_net
79+
# This works because `node` is installed by default on GHA runners
80+
CORES=$(node -e 'console.log(os.cpus().length)')
81+
make transpile_net CORES=$CORES
82+
83+
- name: Setup DBESDK Dafny
84+
uses: dafny-lang/setup-dafny-action@v1.7.2
85+
with:
86+
dafny-version: ${{ inputs.dbesdk-dafny}}
87+
88+
- name: Compile ${{ matrix.library }} implementation
89+
shell: bash
90+
working-directory: ./${{ matrix.library }}
91+
run: |
92+
# This works because `node` is installed by default on GHA runners
93+
CORES=$(node -e 'console.log(os.cpus().length)')
94+
make transpile_implementation_net CORES=$CORES
95+
make transpile_test_net CORES=$CORES
96+
- name: Run Examples
97+
working-directory: ./Examples/runtimes/net
98+
shell: bash
99+
run: |
100+
dotnet run

.github/workflows/dafny_interop_java.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This workflow performs tests in Java.
2-
name: Library Java tests
1+
# This workflow performs tests in Java with MPL nightly latest.
2+
name: Library Java Backwards Interop Tests
33

44
on:
55
workflow_call:
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
dafny-version: ${{ inputs.mpl-dafny }}
4949

50-
- name: Update MPL submodule if using MPL HEAD
50+
- name: Update MPL submodule
5151
working-directory: submodules/MaterialProviders
5252
run: |
5353
git fetch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# This workflow performs tests in DotNet with MPL nightly latest.
2+
name: Library DotNet Backwards Interop Tests
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
mpl-dafny:
8+
description: "The Dafny version to compile the MPL with (4.2.0, dafny-nightly, etc..)"
9+
required: true
10+
type: string
11+
mpl-commit:
12+
description: "The MPL commit to use"
13+
required: false
14+
default: "main"
15+
type: string
16+
dbesdk-dafny:
17+
description: "The Dafny version to compile the DBESDK with (4.2.0, dafny-nightly, etc..)"
18+
required: true
19+
type: string
20+
21+
jobs:
22+
testDotNet:
23+
strategy:
24+
matrix:
25+
library: [DynamoDbEncryption]
26+
dotnet-version: ["6.0.x"]
27+
os: [macos-12, ubuntu-latest, windows-latest]
28+
runs-on: ${{ matrix.os }}
29+
permissions:
30+
id-token: write
31+
contents: read
32+
env:
33+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
34+
DOTNET_NOLOGO: 1
35+
steps:
36+
- name: Support longpaths on Git checkout
37+
run: |
38+
git config --global core.longpaths true
39+
- uses: actions/checkout@v3
40+
with:
41+
submodules: recursive
42+
fetch-depth: 0
43+
44+
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
45+
uses: actions/setup-dotnet@v4
46+
with:
47+
dotnet-version: ${{ matrix.dotnet-version }}
48+
49+
- name: Setup MPL Dafny
50+
uses: dafny-lang/setup-dafny-action@v1.7.2
51+
with:
52+
dafny-version: ${{ inputs.mpl-dafny }}
53+
54+
- name: Update MPL submodule
55+
working-directory: submodules/MaterialProviders
56+
run: |
57+
git fetch
58+
git checkout ${{inputs.mpl-commit}}
59+
git pull
60+
git submodule update --init --recursive
61+
git rev-parse HEAD
62+
63+
- name: Download Dependencies
64+
working-directory: ./${{ matrix.library }}
65+
run: make setup_net
66+
67+
- name: Configure AWS Credentials
68+
uses: aws-actions/configure-aws-credentials@v4
69+
with:
70+
aws-region: us-west-2
71+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2
72+
role-session-name: DDBEC-Dafny-Net-Tests
73+
74+
- name: Compile MPL with Dafny ${{inputs.mpl-dafny}}
75+
shell: bash
76+
working-directory: submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders
77+
run: |
78+
make setup_net
79+
# This works because `node` is installed by default on GHA runners
80+
CORES=$(node -e 'console.log(os.cpus().length)')
81+
make transpile_net CORES=$CORES
82+
83+
- name: Setup DBESDK Dafny
84+
uses: dafny-lang/setup-dafny-action@v1.7.2
85+
with:
86+
dafny-version: ${{ inputs.dbesdk-dafny}}
87+
88+
- name: Compile ${{ matrix.library }} implementation
89+
shell: bash
90+
working-directory: ./${{ matrix.library }}
91+
run: |
92+
# This works because `node` is installed by default on GHA runners
93+
CORES=$(node -e 'console.log(os.cpus().length)')
94+
make transpile_implementation_net CORES=$CORES
95+
make transpile_test_net CORES=$CORES
96+
97+
- name: Test ${{ matrix.library }} net48
98+
if: matrix.os == 'windows-latest'
99+
working-directory: ./${{ matrix.library }}
100+
shell: bash
101+
run: |
102+
dotnet restore runtimes/net/tests
103+
dotnet build runtimes/net/tests
104+
make test_net FRAMEWORK=net48
105+
106+
- name: Test ${{ matrix.library }} net6.0
107+
working-directory: ./${{ matrix.library }}
108+
shell: bash
109+
run: |
110+
dotnet restore runtimes/net/tests
111+
dotnet build runtimes/net/tests
112+
if [ "$RUNNER_OS" == "macOS" ]; then
113+
make test_net_mac_intel
114+
else
115+
make test_net FRAMEWORK=net6.0
116+
fi
117+
118+
- name: Test Build and Pack ${{ matrix.library}}
119+
shell: bash
120+
if: matrix.os != 'windows-latest'
121+
working-directory: ./${{ matrix.library }}
122+
run: |
123+
dotnet build runtimes/net /p:Configuration=Release -nowarn:CS0162,CS0168
124+
dotnet pack runtimes/net/DynamoDbEncryption.csproj --no-build /p:Configuration=Release --output build

0 commit comments

Comments
 (0)