Skip to content

Commit

Permalink
skip Windows tests on release (digital-asset#9656)
Browse files Browse the repository at this point in the history
Caching doesn't seem to work very well here. On a release, we build an
old commit, which has already been tested twice (once as a commit on
`main`, once as part of the release PR).

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
garyverhaegen-da authored May 12, 2021
1 parent 40f69ee commit b58d30b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ bazel build `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/build_exec

bazel shutdown

bazel test `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/test_execution_windows.log //...
if ($env:SKIP_TESTS = "False") {
bazel test `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/test_execution_windows.log //...
}
11 changes: 11 additions & 0 deletions ci/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ steps:
displayName: 'Build'
env:
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
# On release, we want to skip testing because:
# - Caching on Windows is keyed on full path, and full path is somewhat
# random (for a given machine, each pipeline has a its own workdir, but
# they are not the same across machines).
# - In the specific case of a release commit on `main`, the exact same
# code has already been tested twice: once as part of the target
# commit's own build (albeit with 0.0.0 as version number), and once as
# part of the release PR that triggered the build (with correct version
# number).
SKIP_TESTS: ${{and(eq(parameters.is_release, 'true'),
eq(variables['Build.SourceBranchName'], 'main'))}}

- task: PublishBuildArtifacts@1
condition: failed()
Expand Down

0 comments on commit b58d30b

Please sign in to comment.