mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-04 00:36:58 +03:00
windows: working //:git-revision target (#434)
This commit is contained in:
parent
aa70c7f64e
commit
79bbf5c794
7
bazel_tools/workspace_status.cmd
Normal file
7
bazel_tools/workspace_status.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
:: Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
:: SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@echo off
|
||||
|
||||
for /f %%i in ('git rev-parse HEAD') do set RESULT=%%i
|
||||
echo STABLE_GIT_REVISION %RESULT%
|
@ -23,6 +23,7 @@ function bazel() {
|
||||
|
||||
function build-partial() {
|
||||
bazel build `
|
||||
//:git-revision `
|
||||
//compiler/daml-lf-ast/... `
|
||||
//daml-lf/interface/... `
|
||||
//language-support/java/bindings/...
|
||||
@ -37,6 +38,7 @@ function build-partial() {
|
||||
function build-full() {
|
||||
# FIXME: Until all bazel issues on Windows are resolved we will be testing only specific bazel targets
|
||||
bazel build `
|
||||
//:git-revision `
|
||||
@com_github_grpc_grpc//:grpc `
|
||||
//nix/third-party/gRPC-haskell/core:fat_cbits `
|
||||
//daml-foundations/daml-tools/daml-extension:daml_extension_lib `
|
||||
|
@ -41,7 +41,8 @@ cd "$(dirname "$0")"/..
|
||||
step "configuring bazel"
|
||||
|
||||
if is_windows; then
|
||||
echo "build --config windows-ci" > .bazelrc.local
|
||||
echo "build --config windows" > .bazelrc.local
|
||||
echo "build --config windows-ci" >> .bazelrc.local
|
||||
fi
|
||||
|
||||
# sets up write access to the shared remote cache if the branch is not a fork
|
||||
|
11
nix/bazelrc
11
nix/bazelrc
@ -56,25 +56,24 @@ build:linux --action_env=LOCALE_ARCHIVE
|
||||
|
||||
|
||||
# Pass workspace status for stamped actions
|
||||
# We skip this on Windows, otherwise bazel fails with
|
||||
# "Access is denied."
|
||||
# most likely when trying to evaluate the shebang.
|
||||
build:linux --workspace_status_command=bazel_tools/workspace_status.sh
|
||||
build:darwin --workspace_status_command=bazel_tools/workspace_status.sh
|
||||
build:windows --workspace_status_command=bazel_tools/workspace_status.cmd
|
||||
|
||||
# Tell bazel to use the nixpkgs Haskell toolchain on Linux and Darwin
|
||||
build:linux --host_platform=@io_tweag_rules_haskell//haskell/platforms:linux_x86_64_nixpkgs
|
||||
build:darwin --host_platform=@io_tweag_rules_haskell//haskell/platforms:darwin_x86_64_nixpkgs
|
||||
# and GHC's gcc on Windows
|
||||
build:windows --crosstool_top=@io_tweag_rules_haskell_ghc_windows_amd64//:toolchain
|
||||
|
||||
# Tell bazel to use GHC's gcc on Windows
|
||||
# Caching is currently disabled on Windows.
|
||||
# See: https://github.com/tweag/rules_haskell/issues/744 for details.
|
||||
build:windows --crosstool_top=@io_tweag_rules_haskell_ghc_windows_amd64//:toolchain --noremote_accept_cached --noremote_upload_local_results
|
||||
build:windows --noremote_accept_cached
|
||||
|
||||
# We use a special windows configuration on CI: cache is enabled. The caching
|
||||
# is not totally reliable on Windows yet re. absolute paths, but it is not a
|
||||
# problem on CI if all builds share a similar directory structure.
|
||||
build:windows-ci --crosstool_top=@io_tweag_rules_haskell_ghc_windows_amd64//:toolchain
|
||||
build:windows-ci --remote_accept_cached=true
|
||||
|
||||
# Instruct bazel to globally use this flag for compiling protobuf files.
|
||||
# We need the source info for generating proto docs. By default proto_library strips
|
||||
|
Loading…
Reference in New Issue
Block a user