File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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."
You can’t perform that action at this time.
0 commit comments