Skip to content

Commit ca6d80d

Browse files
authored
fix: Split off setup-dafny-from-source-action (#28)
The CI was passing on cases of building from source, but only because the testing environment could call the composite sub-action. It turns out that doesn't work when using this action from a different repository. Instead I've extracted out the logic into a separate https://github.com/dafny-lang/setup-dafny-from-source-action repo.
1 parent f24d1ce commit ca6d80d

3 files changed

Lines changed: 20 additions & 63 deletions

File tree

.github/workflows/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
# Test building from source from a subset of versions
2121
- dafny: 4.0.0
2222
build-from-source: v4.0.0
23-
- dafny: 4.9.0
24-
build-from-source: v4.9.0
23+
- dafny: 4.9.1
24+
build-from-source: v4.9.1
2525

2626
steps:
2727
# The first call to `dotnet tool` on a fresh runner sometimes takes multiple minutes,
@@ -70,3 +70,15 @@ jobs:
7070
run: npm run lint
7171
- name: Test
7272
run: npm test
73+
74+
all-required:
75+
if: always()
76+
needs:
77+
- setup-dafny
78+
- unit-tests
79+
runs-on: ubuntu-22.04
80+
steps:
81+
- name: Verify all required jobs passed
82+
uses: re-actors/alls-green@release/v1
83+
with:
84+
jobs: ${{ toJSON(needs) }}

action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ runs:
1919
with:
2020
dotnet-version: '8.0.x'
2121

22+
# For the reportgenerator and older Dafnyies
23+
- uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '6.0.x'
26+
2227
- if: ${{ !inputs.build-from-source }}
2328
uses: actions/setup-node@v4
2429
with:
@@ -30,11 +35,7 @@ runs:
3035
INPUT_DAFNY-VERSION: ${{ inputs.dafny-version }}
3136

3237
- if: ${{ inputs.build-from-source }}
33-
uses: actions/setup-dotnet@v4
34-
with:
35-
dotnet-version: '8.0.x'
36-
- if: ${{ inputs.build-from-source }}
37-
uses: ./build_dafny_from_source
38+
uses: dafny-lang/setup-dafny-from-source-action@v1
3839
with:
3940
dafny-version: ${{ inputs.dafny-version }}
4041
ref: ${{ inputs.build-from-source }}

build_dafny_from_source/action.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)