Skip to content

Commit 98ffe4e

Browse files
committed
chore: log format.sh output as logs
1 parent 6c755c3 commit 98ffe4e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
run: |
103103
# Use runner tool_cache as cache root for self-hosted runners to avoid internet connection
104104
# issues and to share cache between jobs.
105-
export XDG_CACHE_HOME="${{ runner.tool_cache }}"
105+
export XDG_CACHE_HOME="${{ runner.tool_cache }}/.ci-cache-${{ github.workflow }}"
106106
echo "XDG_CACHE_HOME=${XDG_CACHE_HOME}" | tee -a "${GITHUB_ENV}"
107107
echo "PIP_CACHE_DIR=${XDG_CACHE_HOME}/pip" | tee -a "${GITHUB_ENV}"
108108
echo "UV_CACHE_DIR=${XDG_CACHE_HOME}/uv" | tee -a "${GITHUB_ENV}"
@@ -224,18 +224,17 @@ jobs:
224224
run: |
225225
mkdir -p build
226226
# Run cmake to create the build directory with compile_commands.json
227-
pushd build
228-
cmake .. ${CMAKE_CONFIGURE_OPTIONS}
229-
popd
230-
if ! output=$(./format.sh 2>&1); then
231-
echo "------------------------------------"
232-
echo "message:"
233-
echo "$output"
234-
printf '%s\n' "$output" | grep "Please review and stage the changes."
235-
echo "------------------------------------"
227+
(
228+
cd build
229+
cmake .. ${CMAKE_CONFIGURE_OPTIONS}
230+
)
231+
rc=0
232+
bash format.sh || rc="$?"
233+
rm -rf build
234+
if [[ "${rc}" -ne 0 ]]; then
235+
echo "::error::Format check failed. Please run 'bash format.sh' locally to fix the issues."
236236
exit 1
237237
fi
238-
rm -rf build
239238
240239
- name: Install project (wheel form)
241240
env:

0 commit comments

Comments
 (0)