Skip to content

Commit 52ea494

Browse files
m
1 parent 5a7ddbf commit 52ea494

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Checks that DafnyRuntimePython version in StandardLibrary's pyproject.toml
2+
# matches the Dafny version in project.properties.
3+
# .toml is static and cannot load this automatically.
4+
# This must be bumped manually.
5+
name: Check Python Dafny Version
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- main
12+
13+
14+
jobs:
15+
check-version-consistency:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Validate Dafny Version Consistency
21+
run: |
22+
# Extract the version from pyproject.toml
23+
dafny_runtime_python_version=$(grep -oP 'DafnyRuntimePython\s*=\s*"\K[^\"]+' a/b/pyproject.toml)
24+
25+
# Extract the version from project.properties
26+
dafny_version=$(grep -oP 'dafnyVersion=\K[^\s]+' project.properties)
27+
28+
# Check if the versions match
29+
if [ "$dafny_runtime_python_version" != "$dafny_version" ]; then
30+
echo "Version mismatch! DafnyRuntimePython ($dafny_runtime_python_version) does not match dafnyVersion ($dafny_version)."
31+
exit 1
32+
fi
33+
34+
echo "Versions match: $dafny_runtime_python_version"

0 commit comments

Comments
 (0)