Skip to content

chore: Check that DafnyRuntimePython version matches project.properties dafnyVersion #1

chore: Check that DafnyRuntimePython version matches project.properties dafnyVersion

chore: Check that DafnyRuntimePython version matches project.properties dafnyVersion #1

# Checks that DafnyRuntimePython version in StandardLibrary's pyproject.toml
# matches the Dafny version in project.properties.
# .toml is static and cannot load this automatically.
# This must be bumped manually.
name: Check Python Dafny Version
on:
pull_request:
push:
branches:
- main
jobs:
check-version-consistency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Dafny Version Consistency
run: |
# Extract the version from pyproject.toml
dafny_runtime_python_version=$(grep -oP 'DafnyRuntimePython\s*=\s*"\K[^\"]+' a/b/pyproject.toml)
# Extract the version from project.properties
dafny_version=$(grep -oP 'dafnyVersion=\K[^\s]+' project.properties)
# Check if the versions match
if [ "$dafny_runtime_python_version" != "$dafny_version" ]; then
echo "Version mismatch! DafnyRuntimePython ($dafny_runtime_python_version) does not match dafnyVersion ($dafny_version)."
exit 1
fi
echo "Versions match: $dafny_runtime_python_version"