Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2cb1bb5

Browse files
committedJul 10, 2024·
chore(GHA): add action for testing against MPL HEAD
1 parent e2f2b3b commit 2cb1bb5

File tree

3 files changed

+167
-8
lines changed

3 files changed

+167
-8
lines changed
 
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This workflow regenerates code using smithy-dafny and checks that the output matches what's checked in
2+
# with the latest mpl head
3+
name: Library-MPL-HEAD Code Generation
4+
on:
5+
workflow_call:
6+
inputs:
7+
dafny:
8+
description: "The dafny version to run"
9+
required: true
10+
type: string
11+
12+
jobs:
13+
code-generation:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
library: [DynamoDbEncryption, TestVectors]
18+
# Note dotnet is only used for formatting generated code
19+
# in this workflow
20+
dotnet-version: ["6.0.x"]
21+
os: [ubuntu-latest]
22+
runs-on: ${{ matrix.os }}
23+
defaults:
24+
run:
25+
shell: bash
26+
env:
27+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
28+
DOTNET_NOLOGO: 1
29+
steps:
30+
- name: Support longpaths
31+
run: |
32+
git config --global core.longpaths true
33+
34+
- uses: actions/checkout@v3
35+
with:
36+
submodules: recursive
37+
38+
- name: Update MPL submodule
39+
working-directory: submodules/MaterialProviders
40+
shell: bash
41+
run: |
42+
git checkout main
43+
git pull
44+
git submodule update --init --recursive
45+
46+
- name: Read MPL Version from its properties file
47+
id: read_property
48+
uses: christian-draeger/read-properties@1.1.1
49+
with:
50+
path: "submodules/MaterialProviders/project.properties"
51+
properties: "mplVersion"
52+
53+
# Only used to format generated code
54+
# and to translate version strings such as "nightly-latest"
55+
# to an actual DAFNY_VERSION.
56+
- name: Setup Dafny
57+
uses: dafny-lang/setup-dafny-action@v1.7.0
58+
with:
59+
dafny-version: ${{ inputs.dafny }}
60+
61+
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
62+
uses: actions/setup-dotnet@v4
63+
with:
64+
dotnet-version: ${{ matrix.dotnet-version }}
65+
66+
- uses: ./.github/actions/polymorph_codegen
67+
with:
68+
dafny: ${{ env.DAFNY_VERSION }}
69+
library: ${{ matrix.library }}
70+
diff-generated-code: true

‎.github/workflows/daily_ci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
getVersion:
1010
# Don't run the cron builds on forks
1111
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
12-
uses: ./.github/workflows/dafny_version.yaml
12+
uses: ./.github/workflows/dafny_version.yml
1313
getVerifyVersion:
1414
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
15-
uses: ./.github/workflows/dafny_verify_version.yaml
15+
uses: ./.github/workflows/dafny_verify_version.yml
1616
daily-ci-format:
1717
needs: getVersion
1818
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
@@ -22,7 +22,7 @@ jobs:
2222
daily-ci-codegen:
2323
needs: getVersion
2424
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
25-
uses: ./.github/workflows/library_codegen.yml
25+
uses: ./.github/workflows/ci_codegen.yml
2626
with:
2727
dafny: ${{needs.getVersion.outputs.version}}
2828
daily-ci-verification:
@@ -31,15 +31,33 @@ jobs:
3131
uses: ./.github/workflows/library_dafny_verification.yml
3232
with:
3333
dafny: ${{needs.getVerifyVersion.outputs.version}}
34-
daily-ci-java:
34+
daily-ci-test-vector-verification:
35+
needs: getVerifyVersion
36+
uses: ./.github/workflows/test_vector_verification.yml
37+
with:
38+
dafny: ${{needs.getVerifyVersion.outputs.version}}
39+
daily-ci-java-test-vectors:
3540
needs: getVersion
36-
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
37-
uses: ./.github/workflows/library_java_tests.yml
41+
uses: ./.github/workflows/ci_test_vector_java.yml
42+
with:
43+
dafny: ${{needs.getVersion.outputs.version}}
44+
daily-ci-java-examples:
45+
needs: getVersion
46+
uses: ./.github/workflows/ci_examples_java.yml
3847
with:
3948
dafny: ${{needs.getVersion.outputs.version}}
4049
daily-ci-net:
4150
needs: getVersion
42-
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
43-
uses: ./.github/workflows/library_net_tests.yml
51+
uses: ./.github/workflows/ci_test_net.yml
52+
with:
53+
dafny: ${{needs.getVersion.outputs.version}}
54+
daily-ci-net-test-vectors:
55+
needs: getVersion
56+
uses: ./.github/workflows/ci_test_vector_net.yml
4457
with:
4558
dafny: ${{needs.getVersion.outputs.version}}
59+
daily-ci-net-examples:
60+
needs: getVersion
61+
uses: ./.github/workflows/ci_examples_net.yml
62+
with:
63+
dafny: ${{needs.getVersion.outputs.version}}

‎.github/workflows/mpl-head.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This workflow invokes other workflows with the latest MPL head at 14:00 UTC (7am PDT)
2+
name: MPL HEAD Integration
3+
4+
on:
5+
pull_request:
6+
# schedule:
7+
# # Although this is triggered daily the MPL may not get daily commits, which
8+
# # means that some builds MAY get the same MPL HEAD.
9+
# - cron: "00 14 * * 1-5"
10+
jobs:
11+
getVersion:
12+
# Don't run the cron builds on forks
13+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
14+
uses: ./.github/workflows/dafny_version.yml
15+
getVerifyVersion:
16+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
17+
uses: ./.github/workflows/dafny_verify_version.yml
18+
mpl-head-ci-format:
19+
needs: getVersion
20+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
21+
uses: ./.github/workflows/library_format.yml
22+
with:
23+
dafny: ${{needs.getVersion.outputs.version}}
24+
mpl-head-ci-codegen:
25+
needs: getVersion
26+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
27+
uses: ./.github/actions/mpl-head/mpl_head_codegen.yml
28+
with:
29+
dafny: ${{needs.getVersion.outputs.version}}
30+
# mpl-head-ci-verification:
31+
# needs: getVerifyVersion
32+
# if: github.event_name != 'schedule' || github.repository_owner == 'aws'
33+
# uses: ./.github/workflows/library_dafny_verification.yml
34+
# with:
35+
# dafny: ${{needs.getVerifyVersion.outputs.version}}
36+
# mpl-head-ci-test-vector-verification:
37+
# needs: getVerifyVersion
38+
# uses: ./.github/workflows/test_vector_verification.yml
39+
# with:
40+
# dafny: ${{needs.getVerifyVersion.outputs.version}}
41+
# mpl-head: true
42+
# mpl-head-ci-java-test-vectors:
43+
# needs: getVersion
44+
# uses: ./.github/workflows/ci_test_vector_java.yml
45+
# with:
46+
# dafny: ${{needs.getVersion.outputs.version}}
47+
# mpl-head: true
48+
# mpl-headci-java-examples:
49+
# needs: getVersion
50+
# uses: ./.github/workflows/ci_examples_java.yml
51+
# with:
52+
# dafny: ${{needs.getVersion.outputs.version}}
53+
# mpl-head: true
54+
# mpl-head-ci-net:
55+
# needs: getVersion
56+
# uses: ./.github/workflows/ci_test_net.yml
57+
# with:
58+
# dafny: ${{needs.getVersion.outputs.version}}
59+
# mpl-head: true
60+
# mpl-head-ci-net-test-vectors:
61+
# needs: getVersion
62+
# uses: ./.github/workflows/ci_test_vector_net.yml
63+
# with:
64+
# dafny: ${{needs.getVersion.outputs.version}}
65+
# mpl-head: true
66+
# mpl-head-ci-net-examples:
67+
# needs: getVersion
68+
# uses: ./.github/workflows/ci_examples_net.yml
69+
# with:
70+
# dafny: ${{needs.getVersion.outputs.version}}
71+
# mpl-head: true

0 commit comments

Comments
 (0)
Please sign in to comment.