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 e6fd8e9

Browse files
committedJul 11, 2024·
update verification
1 parent 1ed2565 commit e6fd8e9

File tree

3 files changed

+57
-9
lines changed

3 files changed

+57
-9
lines changed
 

‎.github/workflows/library_dafny_verification.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ on:
1313
required: false
1414
default: false
1515
type: boolean
16+
mpl-version:
17+
description: "MPL version to use"
18+
required: false
19+
type: string
1620
mpl-head:
17-
description: "Using MPL HEAD"
21+
description: "Running on MPL HEAD"
1822
required: false
1923
default: false
2024
type: boolean
@@ -52,11 +56,18 @@ jobs:
5256
with:
5357
dafny-version: ${{ inputs.dafny }}
5458

55-
- uses: ./.github/actions/mpl-head
59+
- name: Update MPL submodule if using MPL HEAD
5660
if: ${{ inputs.mpl-head == true }}
57-
with:
58-
dafny: ${{ env.DAFNY_VERSION }}
59-
update-and-regenerate-mpl: true
61+
working-directory: submodules/MaterialProviders
62+
run: |
63+
git checkout main
64+
git pull
65+
git submodule update --init --recursive
66+
67+
- name: Update project.properties if using MPL HEAD
68+
if: ${{ inputs.mpl-head == true }}
69+
run: |
70+
sed "s/mplDependencyJavaVersion=.*/mplDependencyJavaVersion=${{inputs.mpl-version}}/g" project.properties > project.properties2; mv project.properties2 project.properties
6071
6172
# dafny-reportgenerator requires next6
6273
# but only 7.0 is installed on macos-12-large
@@ -74,14 +85,14 @@ jobs:
7485
diff-generated-code: false
7586

7687
- name: Verify ${{ matrix.library }} Dafny code
77-
working-directory: ./DynamoDbEncryption
88+
working-directory: DynamoDbEncryption
7889
run: |
7990
# This works because `node` is installed by default on GHA runners
8091
CORES=$(node -e 'console.log(os.cpus().length)')
8192
make verify_service CORES=$CORES SERVICE=${{ matrix.library }}
8293
8394
- name: Check solver resource use
8495
if: success() || failure()
85-
working-directory: ./DynamoDbEncryption
96+
working-directory: DynamoDbEncryption
8697
run: |
8798
make dafny-reportgenerator

‎.github/workflows/mpl-head.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@ jobs:
1212
getVerifyVersion:
1313
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
1414
uses: ./.github/workflows/dafny_verify_version.yml
15+
getMplHeadVersion:
16+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
17+
uses: ./.github/workflows/mpl_head_version.yml
1518
mpl-head-ci-format:
1619
needs: getVersion
1720
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
1821
uses: ./.github/workflows/library_format.yml
1922
with:
2023
dafny: ${{needs.getVersion.outputs.version}}
2124
mpl-head-ci-verification:
22-
needs: getVerifyVersion
25+
needs: [getVerifyVersion, getMplHeadVersion]
2326
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
2427
uses: ./.github/workflows/library_dafny_verification.yml
2528
with:
2629
dafny: ${{needs.getVerifyVersion.outputs.version}}
27-
mpl-head: true
30+
mpl-version: ${{needs.getMplHeadVersion.outputs.version}}
2831
# mpl-head-ci-test-vector-verification:
2932
# needs: getVerifyVersion
3033
# uses: ./.github/workflows/test_vector_verification.yml
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow reads the project.properties
2+
# into the environment variables
3+
# and then creates an output variable for `dafnyVerifyVersion `
4+
name: MPL HEAD Version
5+
6+
on:
7+
workflow_call:
8+
outputs:
9+
version:
10+
description: "The dafny version for verify"
11+
value: ${{ jobs.getMplHeadVersion.outputs.version }}
12+
13+
jobs:
14+
getMplHeadVersion:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.read_property.outputs.mplVersion }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Update MPL submodule locally if requested
21+
if: inputs.update-and-regenerate-mpl == 'true'
22+
working-directory: submodules/MaterialProviders
23+
shell: bash
24+
run: |
25+
git checkout main
26+
git pull
27+
git submodule update --init --recursive
28+
29+
- name: Get the MPL version from the MPL submodule
30+
id: read_property
31+
uses: christian-draeger/read-properties@1.1.1
32+
with:
33+
path: "submodules/MaterialProviders/project.properties"
34+
properties: "mplVersion"

0 commit comments

Comments
 (0)
Please sign in to comment.