Skip to content

Commit f8e7df4

Browse files
committed
ci: add set -o pipefail and install log diagnostics
1 parent 167a3ce commit f8e7df4

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161

6262
- name: Configure dtkdeclarative
6363
run: |
64+
set -o pipefail
6465
cmake -B build \
6566
-GNinja \
6667
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -85,6 +86,7 @@ jobs:
8586
8687
- name: Build dtkdeclarative
8788
run: |
89+
set -o pipefail
8890
cmake --build build -j$(nproc) 2>&1 | tee /tmp/cmake-build.log
8991
echo "✅ dtkdeclarative Qt${{ matrix.qt_version }} built successfully!"
9092
echo "=== Built files ==="
@@ -101,10 +103,20 @@ jobs:
101103
102104
- name: Install dtkdeclarative to staging directory
103105
run: |
104-
DESTDIR=/tmp/dtkdeclarative-install cmake --install build --verbose
106+
set -o pipefail
107+
DESTDIR=/tmp/dtkdeclarative-install cmake --install build --verbose 2>&1 | tee /tmp/cmake-install.log
105108
echo "Total: $(find /tmp/dtkdeclarative-install -type f | wc -l) files"
106109
find /tmp/dtkdeclarative-install -type f | head -20
107110
111+
- name: Print install log on failure
112+
if: failure()
113+
run: |
114+
echo "=== cmake-install.log (last 80 lines) ==="
115+
tail -80 /tmp/cmake-install.log 2>/dev/null || echo "(not found)"
116+
tail -20 /tmp/cmake-install.log 2>/dev/null | while IFS= read -r line; do
117+
echo "::error::$line"
118+
done
119+
108120
- name: Create installation package
109121
run: |
110122
ls -la /tmp/dtkdeclarative-install/ || { echo "Install dir missing!"; exit 1; }

0 commit comments

Comments
 (0)