Skip to content

Commit

Permalink
Apply platform_suffix on all Windows pipelines (#5846)
Browse files Browse the repository at this point in the history
* Apply plotform_suffix on all Windows pipelines

To distinguish action keys between the compatibility and the main
workspace and avoid the "undeclared input(s)" error. We also modify the
main workspace's action cache keys to avoid poisoned cache items.

CHANGELOG_BEGIN
CHANGELOG_END

* Avoid exceeding MAX_PATH on Windows

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
  • Loading branch information
aherrmann-da and aherrmann committed May 5, 2020
1 parent 0c90844 commit 150e036
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 11 additions & 0 deletions ci/configure-bazel.sh
Expand Up @@ -47,6 +47,17 @@ fi
if is_windows; then
echo "build --config windows" > .bazelrc.local
echo "build --config windows-ci" >> .bazelrc.local

# Modify the output path (x64_windows-opt-co) to avoid shared action keys
# between external dependencies of the daml and compatibility workspaces.
# These are causing issues on Windows, namely sporadic failures due to
# "undeclared inclusion(s)" with the mingw toolchain. This doesn't modify all
# action keys, e.g. metadata actions like `Mnemonic: Middleman` are
# unaffected. However, all actions that produce artifacts will be affected.
# To avoid exceeding the maximum path limit on Windows we limit the suffix to
# three characters.
CONFIG=${BAZEL_CONFIG_DIR-default}
echo "build --platform_suffix=-${CONFIG:0:2}" >> .bazelrc.local
fi

# sets up write access to the shared remote cache if the branch is not a fork
Expand Down
8 changes: 0 additions & 8 deletions compatibility/test-windows.ps1
Expand Up @@ -44,14 +44,6 @@ cd compatibility
# Symlinks don’t work on Windows.
cp ../.bazelrc .bazelrc

# Modify the output path (x64_windows-opt-compat) to avoid shared action keys
# between external dependencies of the daml and compatibility workspaces. These
# are causing issues on Windows, namely sporadic failures due to "undeclared
# inclusion(s)" with the mingw toolchain. This doesn't modify all action keys,
# e.g. metadata actions like `Mnemonic: Middleman` are unaffected. However, all
# actions that produce artifacts will be affected.
Add-Content .bazelrc "build --platform_suffix=-compat"

bazel shutdown
bazel build //...
bazel shutdown
Expand Down

0 comments on commit 150e036

Please sign in to comment.