From 9efafe0af890bb971ba1dbae4daa4bfb37575383 Mon Sep 17 00:00:00 2001 From: seebees Date: Fri, 20 Oct 2023 12:20:11 -0700 Subject: [PATCH] consolidate dafny version --- .github/workflows/dafny_version.yaml | 15 +++++++++++++++ .github/workflows/pull.yml | 9 +++++---- project.properties | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dafny_version.yaml create mode 100644 project.properties diff --git a/.github/workflows/dafny_version.yaml b/.github/workflows/dafny_version.yaml new file mode 100644 index 000000000..aa9c313e1 --- /dev/null +++ b/.github/workflows/dafny_version.yaml @@ -0,0 +1,15 @@ +# This workflow reads the project.properties +# into the environment variables +# and then creates an output variable for `dafnyVersion` +name: Dafny Version + +jobs: + getDafnyVersion: + outputs: + dafnyVersion: $${{steps.getVersion.outputs.dafnyVersion}} + steps: + - id: getVersion + shell: bash + run: | + export `cat ../../project.properties` + echo "dafnyVersion=$dafnyVersion" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 36853fd18..0a64132cd 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -6,18 +6,19 @@ on: jobs: pr-ci-format: + needs: getDafnyVersion uses: ./.github/workflows/library_dafny_format.yml with: - dafny: '4.2.0' + dafny: ${{needs.getDafnyVersion.dafnyVersion}} pr-ci-verification: uses: ./.github/workflows/library_dafny_verification.yml with: - dafny: '4.2.0' + dafny: ${{needs.getDafnyVersion.dafnyVersion}} pr-ci-java: uses: ./.github/workflows/library_java_tests.yml with: - dafny: '4.2.0' + dafny: ${{needs.getDafnyVersion.dafnyVersion}} pr-ci-net: uses: ./.github/workflows/library_net_tests.yml with: - dafny: '4.2.0' + dafny: ${{needs.getDafnyVersion.dafnyVersion}} diff --git a/project.properties b/project.properties new file mode 100644 index 000000000..d3c7a557f --- /dev/null +++ b/project.properties @@ -0,0 +1 @@ +dafnyVersion=4.2.0