Skip to content

Commit b00ccc2

Browse files
Chore: Updated check deep tests to account for workflow refactoring, run deep tests inline with release process (#4588)
Until this PR, for the last 5 days, check-deep-tests was checking a result that was 5 days old. Releases are impossible because deep-tests.yml has been renamed. This PR tweaks check-deep-tests to check the right workflow and not attempt to check on a per-branch basis (since `nightly-build.yml` checks the same branches no matter what branch it is launched on) - this means development on any protected branch will be blocked by failures on any such branch, but this is at least safe for now. Also changed the `publish-release.yml` workflow to run the deep tests directly instead of checking for a previous run, since this avoids the issue above and is more efficient anyway. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: Robin Salkeld <[email protected]>
1 parent 3574ab8 commit b00ccc2

File tree

7 files changed

+18
-30
lines changed

7 files changed

+18
-30
lines changed

.github/workflows/check-deep-tests-reusable.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Check Deep Tests (Reusable Workflow)
22

33
on:
44
workflow_call:
5-
inputs:
6-
sha:
7-
type: string
8-
branch:
9-
type: string
105

116
jobs:
127
check-deep-tests:
@@ -20,9 +15,11 @@ jobs:
2015
- uses: actions/github-script@v6
2116
if: github.repository_owner == 'dafny-lang'
2217
with:
18+
# Since nightly-build.yml always targets fixed branches now, rather than being parameterized by
19+
# branch, we can't effectively check "for a specific branch".
20+
# That means we have to be less precise for now and block all branches if any branch fails the deep nightly tests.
2321
script: |
2422
const script = require('${{ github.workspace }}/dafny/.github/workflows/check-for-workflow-run.js')
2523
console.log(script({github, context, core,
26-
workflow_id: 'deep-tests.yml',
27-
...('${{ inputs.sha }}' ? {sha: '${{ inputs.sha }}'} : {}),
28-
...('${{ inputs.branch }}' ? {branch: '${{ inputs.branch }}'} : {})}))
24+
workflow_id: 'nightly-build.yml',
25+
branch: 'master'}))

.github/workflows/doc-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ concurrency:
1818
jobs:
1919
check-deep-tests:
2020
uses: ./.github/workflows/check-deep-tests-reusable.yml
21-
with:
22-
branch: ${{ github.base_ref }}
2321

2422
doctests:
2523
needs: check-deep-tests

.github/workflows/msbuild.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ env:
1616
jobs:
1717
check-deep-tests:
1818
uses: ./.github/workflows/check-deep-tests-reusable.yml
19-
with:
20-
branch: ${{ github.base_ref }}
2119

2220
singletons:
2321
needs: check-deep-tests

.github/workflows/publish-release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ env:
1010
dotnet-version: 6.0.x # SDK Version for building Dafny
1111

1212
jobs:
13-
check-deep-tests:
14-
uses: ./.github/workflows/check-deep-tests-reusable.yml
13+
deep-integration-tests:
14+
if: github.repository_owner == 'dafny-lang'
15+
uses: ./.github/workflows/integration-tests-reusable.yml
1516
with:
16-
sha: ${{ github.sha }}
17+
ref: ${{ github.ref }}
18+
all_platforms: true
19+
num_shards: 5
1720

1821
get-version:
1922
runs-on: ubuntu-22.04
@@ -26,7 +29,7 @@ jobs:
2629
version: ${{ steps.get-version.outputs.version-without-v }}
2730

2831
publish-release:
29-
needs: [check-deep-tests, get-version]
32+
needs: [deep-integration-tests, get-version]
3033
uses: ./.github/workflows/publish-release-reusable.yml
3134
with:
3235
name: ${{ needs.get-version.outputs.version }}

.github/workflows/refman.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ concurrency:
1212
jobs:
1313
check-deep-tests:
1414
uses: ./.github/workflows/check-deep-tests-reusable.yml
15-
with:
16-
branch: ${{ github.base_ref }}
1715

1816
build-refman:
1917
needs: check-deep-tests

.github/workflows/runtime-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ concurrency:
1212
jobs:
1313
check-deep-tests:
1414
uses: ./.github/workflows/check-deep-tests-reusable.yml
15-
with:
16-
branch: ${{ github.base_ref }}
1715

1816
build:
1917
needs: check-deep-tests

docs/dev/RELEASE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,21 @@
1313
incremented since the last release, so they do not necessarily need
1414
to be updated. However, you may want to increment them further
1515
depending the types of changes that are in the release.
16+
1617
1. Run `Scripts/prepare_release.py $VER prepare --source-branch <this branch>`
1718
(`--source-branch` is optional and defaults to 'master')
1819
from the root of the repository. The script will check that the repository is in a good
1920
state, create and check out a new release branch, update
2021
`Source/Directory.Build.props` and `RELEASE_NOTES.md`, prepare a release commit,
2122
and push it.
2223

23-
1. Kick off the deep test suite by navigating to
24-
<https://github.com/dafny-lang/dafny/actions/workflows/deep-tests.yml>,
25-
clicking the "Run workflow" dropdown, selecting the newly created branch, and
26-
clicking the "Run workflow" button. The automation for releasing below will
27-
check for a run of this workflow on the exact commit to release. (TODO:
28-
Run this automatically as part of the prepare-release script.)
29-
30-
1. Once the the tests complete, run `Scripts/prepare_release.py $VER
24+
1. Run `./Scripts/prepare_release.py $VER
3125
release` from the root of the repository. The script will tag the
32-
current commit and push it. (TODO: Merge with the two steps above.) A
26+
current commit and push it. A
3327
GitHub action will automatically run in reaction to the tag being
34-
pushed, which will build the artifacts and reference manual and then
28+
pushed, which will run the deep integration test suite,
29+
build the artifacts and reference manual,
30+
publish artifacts to nuget.org, and then
3531
create a draft GitHub release. You can find and watch the progress of
3632
this workflow at <https://github.com/dafny-lang/dafny/actions>.
3733

0 commit comments

Comments
 (0)