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 efe69df

Browse files
committedJul 10, 2024·
test
1 parent 30cf455 commit efe69df

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed
 

‎.github/actions/mpl-head/action.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Check Out and update files with MPL-HEAD"
2+
description: "Updates the MPL submodule to point at HEAD and updates the files that depend on the version defined in project.properties"
3+
inputs:
4+
update-and-regenerate-mpl:
5+
description: "Locally update MPL to the tip of master and regenerate its code"
6+
required: true
7+
default: false
8+
type: boolean
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Update MPL submodule locally if requested
13+
if: inputs.update-and-regenerate-mpl == 'true'
14+
working-directory: submodules/MaterialProviders
15+
shell: bash
16+
run: |
17+
git fetch
18+
git checkout main
19+
git pull
20+
git submodule update --init --recursive
21+
22+
- name: Update top-level project.properties file in MPL
23+
if: inputs.update-and-regenerate-mpl == 'true'
24+
shell: bash
25+
working-directory: submodules/MaterialProviders
26+
run: |
27+
make generate_properties_file
28+
29+
# Update the project.properties file so that we pick up the right runtimes etc.,
30+
# in cases where inputs.dafny is different from the current value in that file.
31+
- name: Generate smithy-dafny-project.properties file
32+
if: inputs.update-and-regenerate-mpl == 'true'
33+
env:
34+
DAFNY_VERSION: ${{ inputs.dafny }}
35+
shell: bash
36+
run: |
37+
make generate_properties_file
38+
39+
- name: Update top-level project.properties file
40+
if: inputs.update-and-regenerate-mpl == 'true'
41+
shell: bash
42+
run: |
43+
awk -F= '!a[$1]++' smithy-dafny-project.properties project.properties > merged.properties
44+
mv merged.properties project.properties
45+
cat project.properties

‎.github/workflows/ci_codegen.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
description: "The dafny version to run"
88
required: true
99
type: string
10+
mpl-head:
11+
description: "Using MPL HEAD"
12+
required: false
13+
default: false
14+
type: boolean
1015

1116
jobs:
1217
code-generation:
@@ -34,6 +39,11 @@ jobs:
3439
with:
3540
submodules: recursive
3641

42+
- uses: ./.github/actions/mpl-head
43+
if: ${{ inputs.mpl-head == true }}
44+
with:
45+
update-and-regenerate-mpl: true
46+
3747
# Only used to format generated code
3848
# and to translate version strings such as "nightly-latest"
3949
# to an actual DAFNY_VERSION.

‎.github/workflows/mpl-head.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ jobs:
2121
mpl-head-ci-codegen:
2222
needs: getVersion
2323
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
24-
uses: ./.github/actions/mpl-head/mpl_head_codegen.yml
24+
uses: ./.github/workflows/ci_codegen.yml
2525
with:
2626
dafny: ${{needs.getVersion.outputs.version}}
27+
mpl-head: true
2728
# mpl-head-ci-verification:
2829
# needs: getVerifyVersion
2930
# if: github.event_name != 'schedule' || github.repository_owner == 'aws'

0 commit comments

Comments
 (0)
Please sign in to comment.