Skip to content

Commit aa2bed1

Browse files
authored
chore: re-enable Dafny for MacOS (#1343)
.NET had a signature failure in MacOS. This was fixed in 9.0.202. This installs at least this version of .NET to make the setup-dafny-action succeed.
1 parent eba8ce6 commit aa2bed1

10 files changed

Lines changed: 42 additions & 19 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
#
3+
# This local action consolidate all uses of dafny-lang/setup-dafny-action
4+
# as well as works around any dependencies or issues with setting up Dafny.
5+
# It can also be re-used by downstream projects such as the DB-ESDK and ESDK.
6+
#
7+
name: "Setup Dafny"
8+
description: "This uses the setup Dafny action."
9+
inputs:
10+
dafny-version:
11+
description: "The Dafny version to setup"
12+
required: true
13+
type: string
14+
runs:
15+
using: "composite"
16+
steps:
17+
# The dotnet tool requires >= 9.0.202 to work on MacOS
18+
# See: https://github.com/dotnet/sdk/issues/46857#issuecomment-2734338347
19+
# Ideally this action would only install this on MacOS,
20+
# but I do not want to keep track of the various values
21+
# See: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#detecting-the-operating-system
22+
- name: Setup .NET Core SDK '9.0.x'
23+
uses: actions/setup-dotnet@v3
24+
with:
25+
dotnet-version: "9.0.x"
26+
27+
- name: Setup Dafny with setup-dafny action
28+
uses: dafny-lang/setup-dafny-action@v1.8.0
29+
with:
30+
dafny-version: ${{ inputs.dafny-version }}

.github/workflows/library_codegen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
# and to translate version strings such as "nightly-latest"
5454
# to an actual DAFNY_VERSION.
5555
- name: Setup Dafny
56-
uses: dafny-lang/setup-dafny-action@v1.8.0
56+
uses: ./.github/actions/setup_dafny
5757
with:
5858
dafny-version: ${{ inputs.dafny }}
5959

.github/workflows/library_dafny_verification.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,10 @@ jobs:
5252
- run: git submodule update --init --recursive smithy-dafny
5353

5454
- name: Setup Dafny
55-
uses: dafny-lang/setup-dafny-action@v1.8.0
55+
uses: ./.github/actions/setup_dafny
5656
with:
5757
dafny-version: ${{ inputs.dafny }}
5858

59-
# dafny-reportgenerator requires next6
60-
# but only 7.0 is installed on macos-13-large
61-
- name: Setup .NET Core SDK '6.0.x'
62-
uses: actions/setup-dotnet@v3
63-
with:
64-
dotnet-version: "6.0.x"
65-
6659
- name: Regenerate code using smithy-dafny if necessary
6760
if: ${{ inputs.regenerate-code }}
6861
uses: ./.github/actions/polymorph_codegen

.github/workflows/library_format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- run: git submodule update --init --recursive smithy-dafny
5050

5151
- name: Setup Dafny
52-
uses: dafny-lang/setup-dafny-action@v1.8.0
52+
uses: ./.github/actions/setup_dafny
5353
with:
5454
dafny-version: ${{ inputs.dafny }}
5555

.github/workflows/library_go_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- run: git submodule update --init --recursive smithy-dafny
6666

6767
- name: Setup Dafny
68-
uses: dafny-lang/setup-dafny-action@v1.8.0
68+
uses: ./.github/actions/setup_dafny
6969
with:
7070
dafny-version: ${{ inputs.dafny }}
7171

.github/workflows/library_interop_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ jobs:
100100

101101
- name: Setup Dafny Rust
102102
if: matrix.language == 'rust'
103-
uses: dafny-lang/setup-dafny-action@v1.8.0
103+
uses: ./.github/actions/setup_dafny
104104
with:
105105
dafny-version: nightly-2025-01-30-7db1e5f
106106

107107
- name: Setup Dafny Not Rust
108108
if: matrix.language != 'rust'
109-
uses: dafny-lang/setup-dafny-action@v1.8.0
109+
uses: ./.github/actions/setup_dafny
110110
with:
111111
dafny-version: ${{ inputs.dafny }}
112112

@@ -290,13 +290,13 @@ jobs:
290290

291291
- name: Setup Dafny 2 Rust
292292
if: matrix.decrypting_language == 'rust'
293-
uses: dafny-lang/setup-dafny-action@v1.8.0
293+
uses: ./.github/actions/setup_dafny
294294
with:
295295
dafny-version: nightly-2025-01-30-7db1e5f
296296

297297
- name: Setup Dafny 2 Not Rust
298298
if: matrix.decrypting_language != 'rust'
299-
uses: dafny-lang/setup-dafny-action@v1.8.0
299+
uses: ./.github/actions/setup_dafny
300300
with:
301301
dafny-version: ${{ inputs.dafny }}
302302

.github/workflows/library_java_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- run: git submodule update --init --recursive smithy-dafny
6363

6464
- name: Setup Dafny
65-
uses: dafny-lang/setup-dafny-action@v1.8.0
65+
uses: ./.github/actions/setup_dafny
6666
with:
6767
dafny-version: ${{ inputs.dafny }}
6868

.github/workflows/library_net_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
dotnet-version: ${{ matrix.dotnet-version }}
7070

7171
- name: Setup Dafny
72-
uses: dafny-lang/setup-dafny-action@v1.8.0
72+
uses: ./.github/actions/setup_dafny
7373
with:
7474
dafny-version: ${{ inputs.dafny }}
7575

.github/workflows/library_python_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- run: git submodule update --init --recursive smithy-dafny
6666

6767
- name: Setup Dafny
68-
uses: dafny-lang/setup-dafny-action@v1.8.0
68+
uses: ./.github/actions/setup_dafny
6969
with:
7070
dafny-version: ${{ inputs.dafny }}
7171

.github/workflows/library_rust_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
components: rustfmt
6565

6666
- name: Setup Dafny
67-
uses: dafny-lang/setup-dafny-action@v1.8.0
67+
uses: ./.github/actions/setup_dafny
6868
with:
6969
dafny-version: nightly-2025-01-30-7db1e5f
7070

0 commit comments

Comments
 (0)