-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support building Dafny from source (#26)
Adds optional build-from-source input.
- Loading branch information
Showing
4 changed files
with
102 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Build Dafny from source" | ||
description: "Builds the given branch of Dafny from source" | ||
inputs: | ||
dafny-version: | ||
description: "Dafny version to build from source" | ||
required: true | ||
type: string | ||
ref: | ||
description: "The Dafny branch, tag or SHA to build" | ||
required: true | ||
type: string | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: "17" | ||
|
||
- name: Checkout Dafny | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: dafny-lang/dafny | ||
path: dafny | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setup Z3 | ||
uses: cda-tum/[email protected] | ||
with: | ||
version: 4.12.1 | ||
|
||
- name: Build Dafny | ||
shell: bash | ||
run: | | ||
make -C dafny exe | ||
- name: Add dafny to PATH (non-Windows) | ||
if: runner.os != 'Windows' | ||
shell: bash | ||
run: | | ||
echo ${{ github.workspace }}/dafny/Scripts >> $GITHUB_PATH | ||
- name: Add dafny to PATH (Windows) | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
Add-Content $env:GITHUB_PATH "${{ github.workspace }}/dafny/Scripts" | ||
- name: Export DAFNY_VERSION | ||
shell: bash | ||
run: | | ||
echo "DAFNY_VERSION=${{ inputs.dafny-version }}" >> $GITHUB_ENV | ||
- name: Install reportgenerator | ||
shell: bash | ||
run: | | ||
dotnet tool install -g dafny-reportgenerator --version 1.* |