Skip to content

Commit 85438ac

Browse files
committed
Detect location of llvm-profdata
1 parent 03fa9cf commit 85438ac

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/actions/set-up/action.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2025 Google LLC
1+
# Copyright 2021-2026 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -107,6 +107,13 @@ runs:
107107
# Use disk cache to speed up runs.
108108
disk-cache: ${{inputs.bazel-version}}-${{inputs.cc}}
109109
repository-cache: true
110+
- name: Configure system (macOS)
111+
# Detect Xcode command-line tools on macOS.
112+
shell: bash
113+
run: |
114+
profdata="$(xcrun --find llvm-profdata)"
115+
echo "BAZEL_LLVM_PROFDATA=${profdata:?}" >> "${GITHUB_ENV:?}"
116+
if: runner.os == 'macOS'
110117
- name: Configure system (Windows)
111118
# Make Bazel find the right binaries on GitHub. See
112119
# https://bazel.build/install/windows#bazel_does_not_find_bash_or_bashexe.

0 commit comments

Comments
 (0)