Skip to content

Commit 141c572

Browse files
committed
Use a shorter Bazel output base for Windows CI
1 parent dcc80b5 commit 141c572

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

.bazelrc

+17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
###############################################################################
2+
## Bazel Configuration Flags
3+
##
4+
## `.bazelrc` is a Bazel configuration file.
5+
## https://bazel.build/docs/best-practices#bazelrc-file
6+
###############################################################################
7+
18
build --enable_platform_specific_config
29
build:linux --@rules_rust//:extra_rustc_flags=-Clink-arg=-fuse-ld=lld
310
build:linux --cxxopt=-std=c++17
411
build:macos --cxxopt=-std=c++17
12+
13+
###############################################################################
14+
## Custom user flags
15+
##
16+
## This should always be the last thing in the `.bazelrc` file to ensure
17+
## consistent behavior when setting flags in that file as `.bazelrc` files are
18+
## evaluated top to bottom.
19+
###############################################################################
20+
21+
try-import %workspace%/user.bazelrc

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,13 @@ jobs:
120120
- name: Install lld
121121
run: sudo apt-get install lld
122122
if: matrix.os == 'ubuntu'
123+
- name: Setup Bazelrc (Windows)
124+
run: |
125+
echo "startup --output_user_root=D:/bzl" > ./user.bazelrc
126+
if: startswith(runner.os, 'Windows')
123127
- run: bazel --version
124128
- run: bazel run demo --verbose_failures --noshow_progress ${{matrix.os == 'macos' && '--xcode_version_config=tools/bazel:github_actions_xcodes' || ''}}
125-
continue-on-error: ${{matrix.os == 'windows'}} # https://github.com/bazelbuild/bazel/issues/18592
126129
- run: bazel test ... --verbose_failures --noshow_progress ${{matrix.os == 'macos' && '--xcode_version_config=tools/bazel:github_actions_xcodes' || ''}}
127-
continue-on-error: ${{matrix.os == 'windows'}} # https://github.com/bazelbuild/bazel/issues/18592
128130
- name: Check MODULE.bazel.lock up to date
129131
run: git diff --exit-code
130132
if: matrix.os == 'ubuntu' || matrix.os == 'macos'

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/bazel-cxx
44
/bazel-out
55
/bazel-testlogs
6+
/user.bazelrc
67
/buck-out
78
/expand.cc
89
/expand.rs

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "cxx.rs",
3-
version = "1.0.145",
3+
version = "0.0.0",
44
bazel_compatibility = [">=7.2.1"],
55
compatibility_level = 1,
66
)

0 commit comments

Comments
 (0)