Skip to content

Commit cc1658d

Browse files
committed
Fix CI jobs.
1 parent 83559d1 commit cc1658d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ jobs:
128128
# require compiling.
129129
runs-on: ubuntu-24.04
130130
needs: toolchain
131-
env:
132-
CAT_LINT_BUILD_DIR: ${{ runner.temp }}/cat-build-lint
133131
steps:
134132
- uses: actions/checkout@v4
135133

136134
- uses: ./.github/actions/setup-toolchain
137135

136+
- name: Set lint build directory
137+
run: echo "CAT_LINT_BUILD_DIR=${RUNNER_TEMP}/cat-build-lint" >> "${GITHUB_ENV}"
138+
138139
- name: Verify unique basenames under src/
139140
# Every file under `src/` must have a unique name. This makes searching
140141
# the codebase easier and is important for the `cat-intermediaries` target.

cmake/opt_report.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ unset(_cat_impl_sources_for_opt_report)
5050
# without the executable bit, so prefix `python3` when the resolved path ends in
5151
# `.py`.
5252
string(REGEX MATCH "^[0-9]+" _cat_opt_clang_major "${CMAKE_CXX_COMPILER_VERSION}")
53+
get_filename_component(_cat_opt_compiler_bin "${CMAKE_CXX_COMPILER}" DIRECTORY)
54+
get_filename_component(_cat_opt_toolchain_root "${_cat_opt_compiler_bin}" DIRECTORY)
5355
find_program(CAT_OPT_VIEWER_PATH
5456
NAMES opt-viewer.py opt-viewer
5557
HINTS
58+
"${_cat_opt_toolchain_root}/usr/lib/llvm-${_cat_opt_clang_major}/share/opt-viewer"
5659
"/usr/lib/llvm-${_cat_opt_clang_major}/share/opt-viewer"
5760
"/usr/share/llvm-${_cat_opt_clang_major}/opt-viewer"
5861
"/usr/local/lib/llvm-${_cat_opt_clang_major}/share/opt-viewer"
@@ -72,4 +75,6 @@ else()
7275
"cat-opt-report: `opt-viewer.py` not found; install `llvm-${_cat_opt_clang_major}-tools` "
7376
"or put `opt-viewer.py` on PATH to render the YAML records.")
7477
endif()
78+
unset(_cat_opt_compiler_bin)
7579
unset(_cat_opt_clang_major)
80+
unset(_cat_opt_toolchain_root)

0 commit comments

Comments
 (0)