Skip to content

Commit c5d8370

Browse files
committed
ci: add validate-travis-macos.sh for issue #35 reviewers
Maintainers can run ./scripts/validate-travis-macos.sh locally to confirm the macOS matrix is enabled and the failing Homebrew OpenCV path is gone.
1 parent 0cfd17a commit c5d8370

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

scripts/validate-travis-macos.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
# Validates .travis.yml for the macOS matrix fix (issue #35).
3+
# Run from repo root: ./scripts/validate-travis-macos.sh
4+
set -euo pipefail
5+
6+
root="$(cd "$(dirname "$0")/.." && pwd)"
7+
cd "$root"
8+
9+
echo "==> YAML parse"
10+
ruby -e 'require "yaml"; YAML.load_file(".travis.yml"); puts "yaml ok"'
11+
12+
echo "==> macOS matrix entry enabled"
13+
grep -q '^[[:space:]]*- os: osx' .travis.yml || {
14+
echo "FAIL: expected active '- os: osx' matrix entry"
15+
exit 1
16+
}
17+
18+
echo "==> macOS before_install skips Homebrew OpenCV"
19+
awk '/TRAVIS_OS_NAME.*osx/,/fi/ {print}' .travis.yml | grep -q 'brew install.*opencv' && {
20+
echo "FAIL: macOS block still runs 'brew install ... opencv'"
21+
exit 1
22+
} || true
23+
24+
echo "==> whitespace"
25+
git diff --check
26+
27+
echo "All checks passed."

0 commit comments

Comments
 (0)