Skip to content

Commit 52f1964

Browse files
zccrsCopilot
andcommitted
ci: use pipefail to expose cmake configure/build errors
Without set -o pipefail, cmake failures in piped commands are masked. This ensures the step fails properly if cmake configure or build fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 75cf7b1 commit 52f1964

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/dtkdeclarative-archlinux-build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161

6262
- name: Configure and build dtkdeclarative
6363
run: |
64+
set -o pipefail
6465
cmake -B build \
6566
-GNinja \
6667
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -71,12 +72,15 @@ jobs:
7172
-DBUILD_DOCS=OFF \
7273
-DBUILD_EXAMPLES=OFF \
7374
-DBUILD_TESTING=OFF \
74-
-DDTK5=${{ matrix.dtk5 }} 2>&1 | tee /tmp/cmake-configure.log || { echo "=== CMAKE CONFIGURE FAILED ==="; cat /tmp/cmake-configure.log; exit 1; }
75-
cmake --build build -j$(nproc) 2>&1 | tee /tmp/cmake-build.log || { echo "=== CMAKE BUILD FAILED (last 200 lines) ==="; tail -200 /tmp/cmake-build.log; exit 1; }
75+
-DDTK5=${{ matrix.dtk5 }} 2>&1 | tee /tmp/cmake-configure.log
76+
cmake --build build -j$(nproc) 2>&1 | tee /tmp/cmake-build.log
7677
echo "✅ dtkdeclarative Qt${{ matrix.qt_version }} built successfully!"
78+
echo "=== Built files ==="
79+
find build -name "*.so" -o -name "*.a" | head -20
7780
7881
- name: Install dtkdeclarative to staging directory
7982
run: |
83+
cat build/cmake_install.cmake 2>/dev/null | head -30 || true
8084
DESTDIR=/tmp/dtkdeclarative-install cmake --install build --verbose
8185
echo "Total: $(find /tmp/dtkdeclarative-install -type f | wc -l) files"
8286
find /tmp/dtkdeclarative-install -type f | head -20

0 commit comments

Comments
 (0)