Skip to content

Commit 66cd50f

Browse files
fix(ci): ensure complete TagLib source extraction and add verification
Found and fixed cmake error using act local testing: - CMake Error: "/tmp/taglib-2.0.2" does not contain CMakeLists.txt Root cause: The source extraction was incomplete, leaving the directory structure but missing critical files like CMakeLists.txt. Fix: - Always re-extract source (remove cached incomplete extraction) - Add verification step to check CMakeLists.txt exists - Fail fast with clear error message if extraction incomplete Update act-guide.md with debugging example showing how act revealed the hidden cmake error that was invisible in CI logs. Tested: scripts/build-taglib.sh --force (Success: libtag.a built) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 58feb37 commit 66cd50f

2 files changed

Lines changed: 29 additions & 3 deletions

File tree

docs/act-guide.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,32 @@
66
# Run lint checks (fastest, fully compatible)
77
act -W .github/workflows/test-local.yml -j lint
88

9+
# Debug build issues (runs natively on your machine)
10+
act -j build -W .github/workflows/test.yml 2>&1 | tee /tmp/act-build.log
11+
912
# List all available workflows and jobs
1013
act -l
1114

1215
# Run specific workflow
1316
act -W .github/workflows/test-local.yml
1417
```
1518

19+
## Debugging with act
20+
21+
act is invaluable for debugging CI failures:
22+
23+
1. **Reproduce errors locally** - Run the exact same steps as CI
24+
2. **Iterate quickly** - No need to push/wait for CI
25+
3. **See full output** - All logs captured (even what's hidden in CI)
26+
4. **Native execution** - Self-hosted runners run on your machine with all your tools
27+
28+
**Example**: We used act to find the cmake error in `build-taglib.sh`:
29+
```bash
30+
act -j build 2>&1 | tee /tmp/act-build.log
31+
grep -i "cmake error" /tmp/act-build.log
32+
# Found: CMake Error: The source directory "/tmp/taglib-2.0.2" does not appear to contain CMakeLists.txt.
33+
```
34+
1635
## Why test-local.yml?
1736

1837
The `test-local.yml` workflow is designed for act compatibility:

scripts/build-taglib.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,16 @@ if [[ ! -f "${SOURCE_TAR}" ]]; then
6060
-o "${SOURCE_TAR}"
6161
fi
6262

63-
if [[ ! -d "${SOURCE_DIR}" ]]; then
64-
echo "Extracting source..."
65-
tar xzf "${SOURCE_TAR}" -C /tmp
63+
# Always re-extract to ensure complete source tree
64+
echo "Extracting source..."
65+
rm -rf "${SOURCE_DIR}"
66+
tar xzf "${SOURCE_TAR}" -C /tmp
67+
68+
# Verify CMakeLists.txt exists
69+
if [[ ! -f "${SOURCE_DIR}/CMakeLists.txt" ]]; then
70+
echo "ERROR: CMakeLists.txt not found after extraction" >&2
71+
echo "Expected at: ${SOURCE_DIR}/CMakeLists.txt" >&2
72+
exit 1
6673
fi
6774

6875
# Clean previous build

0 commit comments

Comments
 (0)