-
Notifications
You must be signed in to change notification settings - Fork 14
69 lines (64 loc) · 2.08 KB
/
mpl_head_version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This workflow reads the project.properties
# into the environment variables
# and then creates an output variable for `dafnyVerifyVersion `
name: MPL HEAD Version
on:
workflow_call:
inputs:
mpl-head:
description: "Using MPL HEAD?"
required: true
default: main
type: string
outputs:
mplVersion:
description: "The MPL version"
value: ${{ jobs.getMplHeadVersion.outputs.version }}
dafnyVersion:
description: "The dafny version for the MPL"
value: ${{ jobs.getMplHeadDafnyVersion.outputs.version }}
jobs:
getMplHeadVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.mplVersion }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Update MPL submodule locally if requested
working-directory: submodules/MaterialProviders
shell: bash
run: |
git checkout ${{inputs.mpl-head}}
git submodule update --init --recursive
git rev-parse HEAD
- name: Get the MPL version from the MPL submodule
id: read_property
uses: christian-draeger/[email protected]
with:
path: "submodules/MaterialProviders/project.properties"
properties: "mplVersion"
getMplHeadDafnyVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.dafnyVersion }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Update MPL submodule locally if requested
working-directory: submodules/MaterialProviders
shell: bash
run: |
git checkout ${{inputs.mpl-head}}
git submodule update --init --recursive
git rev-parse HEAD
- name: Get the MPL version from the MPL submodule
id: read_property
uses: christian-draeger/[email protected]
with:
path: "submodules/MaterialProviders/project.properties"
properties: "dafnyVersion"