travis-ci / travis-ci

Free continuous integration platform for GitHub projects.
https://travis-ci.org
8.42k stars 720 forks source link

Incorrect OS X CI environment brew upgrade instructions #2641

Closed klaaspieter closed 10 years ago

klaaspieter commented 10 years ago

The documentation about the OS X CI environment suggests using the following to keep packages up-to-date:

before_install:
  - brew update
  - brew outdated | grep -q <package-name> && brew upgrade <package-name>

It appears the build is stopped because grep exits with a non 0 code when doesn't exist. This appears to stop the build.

Build log:

Using worker: worker-mac-1.saucelabs.travis-ci.com:travis-mac_osx-3

Installing an SSH key

$ git clone --depth=50 --branch=travis git@github.com:yourkarma/ios.git yourkarma/ios
Cloning into 'yourkarma/ios'...
Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of known hosts.
remote: Counting objects: 17804, done.
remote: Compressing objects: 100% (5480/5480), done.
remote: Total 17804 (delta 11740), reused 17782 (delta 11727)
Receiving objects: 100% (17804/17804), 36.73 MiB | 3.69 MiB/s, done.
Resolving deltas: 100% (11740/11740), done.
Checking connectivity... done.
Checking out files: 100% (3302/3302), done.
$ cd yourkarma/ios
$ git checkout -qf c7b2ca0db631870626e6cef03c0715f679ee23be
$ git submodule init
$ git submodule update
travis_fold:end:git.5
$ rvm use default
Using /Users/travis/.rvm/gems/ruby-2.0.0-p353
$ osascript -e 'set simpath to "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator" as POSIX file' -e 'tell application "Finder"' -e 'open simpath' -e 'end tell'
$ ruby --version
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
$ rvm --version
rvm 1.25.27 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ xcodebuild -version -sdk
MacOSX10.8.sdk - OS X 10.8 (macosx10.8)
SDKVersion: 10.8
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 12F37
ProductCopyright: 1983-2013 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.8.5
ProductVersion: 10.8.5

MacOSX10.9.sdk - OS X 10.9 (macosx10.9)
SDKVersion: 10.9
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 13C64
ProductCopyright: 1983-2014 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.9.2
ProductVersion: 10.9.2

iPhoneOS7.1.sdk - iOS 7.1 (iphoneos7.1)
SDKVersion: 7.1
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
PlatformVersion: 7.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
ProductBuildVersion: 11D167
ProductCopyright: 1983-2014 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.1

iPhoneSimulator6.1.sdk - Simulator - iOS 6.1 (iphonesimulator6.1)
SDKVersion: 6.1
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
ProductBuildVersion: 10B141
ProductCopyright: 1983-2013 Apple Inc.
ProductName: iPhone OS
ProductVersion: 6.1

iPhoneSimulator7.0.sdk - Simulator - iOS 7.0 (iphonesimulator7.0)
SDKVersion: 7.0
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
ProductBuildVersion: 11B507
ProductCopyright: 1983-2013 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.0.3

iPhoneSimulator7.1.sdk - Simulator - iOS 7.1 (iphonesimulator7.1)
SDKVersion: 7.1
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
ProductBuildVersion: 11D167
ProductCopyright: 1983-2014 Apple Inc.
ProductName: iPhone OS
ProductVersion: 7.1

Xcode 5.1.1
Build version 5B1008
$ pod --version
0.33.1
$ brew update
Updated Homebrew from 614a96fe to ccccb2f7.
==> New Formulae
ats2-postiats               libetonyek
bibclean                libmspub
blink1                  libnice
cayley                  libodfgen
cereal                  libressl
cgrep                   libvisio
check_postgres              makepkg
dante                   mat
datamash                megacmd
dockutil                mercury
doitlive                mesos
elixir-build                mozjpeg
fig                 ocamlsdl
fpc                 onetime
github-release              openal-soft
hachoir-metadata            osh
homebrew/versions/android-ndk-r9d   pianod
homebrew/versions/elasticsearch11   pypy3
homebrew/versions/erlang-r16        quazip
homebrew/versions/go12          qwtpolar
homebrew/versions/gradle110     slurm
homebrew/versions/gradle112     ssdb
homebrew/versions/gradle16      storm
homebrew/versions/gradle18      switchaudio-osx
homebrew/versions/grails223     telepathy-gabble
homebrew/versions/grails224     telepathy-glib
homebrew/versions/isl012        telepathy-idle
homebrew/versions/kafka080      telepathy-mission-control
homebrew/versions/play22        termshare
homebrew/versions/riak132       the_platinum_searcher
homebrew/versions/tomcat7       titan-server
httpie                  transcrypt
hydra-cli               udpxy
ipinfo
==> Updated Formulae
aalib                   bup
aamath                  cabal-install
aardvark_shell_utils            calc
abcm2ps                 cask
abcmidi                 cassandra
ace                 cbmbasic
ack                 ccal
acpica                  cctools-headers
activemq                cdecl
adobe-air-sdk               cdrtools
afflib                  cfengine
afio                    cfitsio
aggregate               cgdb
aha                 cheat
algol68g                check
align                   chibi-scheme
alure                   chicken
amtterm                 chisel
analog                  chkrootkit
android-ndk             chmlib
android-sdk             cimg
ansible                 cksfv
ansifilter              clamav
ant                 clhep
antlr                   clib
apache-forrest              clipsafe
apache-spark                cln
apachetop               clojurescript
apollo                  cloog
app-engine-java-sdk         closure-compiler
appscale-tools              clucene
apt-cacher-ng               cmake
aqbanking               concurrencykit
arangodb                cookiecutter
aria2                   coq
arp-scan                coremod
arp-sk                  coreutils
arping                  couchdb
arpoison                couchpotatoserver
ascii                   cowsay
assimp                  cpansearch
aterm                   cpmtools
aubio                   cppcheck
auto-scaling                cpptest
autogen                 cpputest
autopano-sift-c             cracklib
avian                   crunch
avra                    cspice
avrdude                 css-crush
awscli                  csv-fix
base64                  csvprintf
basex                   cuetools
bash                    curl
bbcp                    cutter
bdw-gc                  cyassl
bear                    czmq
betty                   d-bus
bgrep                   daemonize
bind                    daq
bindfs                  darkhttpd
binwalk                 dart
bitchx                  dasm
bitlbee                 datomic
bmon                    davix
boost                   dcmtk
boot2docker             dcraw
ddar                    gifsicle
ddate                   git
direnv                  git-annex
dirmngr                 git-cola
disco                   git-extras
disktype                git-tracker
djvulibre               gitbucket
dmenu                   glib-networking
dnsmasq                 glm
docker                  gnunet
drush                   gnupg
dub                 gnupg2
duplicity               gnuplot
duply                   gnutls
dwm                 go
dxflib                  go-app-engine-32
dylibbundler                go-app-engine-64
e2fsprogs               goaccess
ec2-ami-tools               google-app-engine
ec2-api-tools               gpg-agent
ejabberd                gpm
elasticsearch               gptfdisk
elinks                  gputils
elixir                  gradle
emacs                   grails
emscripten              graphicsmagick
enscript                grib-api
entr                    groonga
erlang                  groovy
esniper                 gsettings-desktop-schemas
etcd                    gssdp
etcdctl                 gst-libav
euca2ools               gst-plugins-bad
exiftool                gst-plugins-base
exim                    gst-plugins-good
f3                  gst-plugins-ugly
fail2ban                gstreamer
fakeroot                gtk+
fdupes                  gvp
feh                 gwenhywfar
ffmpeg                  gwyddion
fio                 hadoop
fleetctl                halibut
fluid-synth             hamlib
freeimage               hamsterdb
freeipmi                haproxy
frege                   harfbuzz
frescobaldi             hashpump
fribidi                 haskell-platform
fswatch                 heroku-toolbelt
ftgl                    hexchat
fuseki                  hidapi
fzf                 homebank
gauche                  homebrew/versions/ansible14
gawk                    homebrew/versions/cassandra12
gcc                 homebrew/versions/elasticsearch090
gcutil                  homebrew/versions/erlang-r13
gd                  homebrew/versions/erlang-r14
gdal                    homebrew/versions/erlang-r15
geoip                   homebrew/versions/jenkins-lts
geoipupdate             homebrew/versions/llvm34
gettext                 homebrew/versions/subversion17
gforth                  homebrew/versions/valgrind38
ghc                 homebrew/versions/zeromq3
ghostscript             htmlcleaner
giblib                  httpry
httrack                 libcdio
hub                 libcec
hunspell                libcello
hydra                   libcoap
id3lib                  libconfig
ievms                   libcouchbase
ii                  libcppa
imagemagick             libcroco
imapsync                libcsv
imlib2                  libcue
inkscape                libcuefile
innotop                 libdaemon
ino                 libdap
inspircd                libdc1394
iodine                  libdiscid
ios-webkit-debug-proxy          libdlna
iozone                  libdmtx
iperf3                  libdrawtext
ircd-hybrid             libdshconfig
ircd-irc2               libdsk
iso-codes               libdv
isync                   libdvbpsi
jack                    libdvdnav
javarepl                libechonest
jboss-forge             libestr
jena                    libev
jenkins                 libevent
jetty                   libewf
jpeg-turbo              libextractor
jq                  libfaketime
jruby                   libfishsound
jshon                   libfixbuf
jslint4java             libflowmanager
jsmin                   libfreefare
jsonpp                  libfreenect
juise                   libftdi
juju                    libgee
juju-quickstart             libgetdata
kdiff3                  libgfshare
knot                    libgit2
kytea                   libglade
l-smash                 libglademm
lastfmlib               libgnomecanvas
latex2rtf               libgnomecanvasmm
lcdf-typetools              libgsm
lcov                    libgtop
ledger                  libhid
leiningen               libical
leptonica               libicns
leveldb                 libident
lftp                    libidl
lib3ds                  libimobiledevice
libaacs                 libinfinity
libagg                  libiptcdata
libantlr3c              libiscsi
libart                  libkate
libass                  libkml
libatomic_ops               libksba
libav                   liblas
libbind                 liblastfm
libbluray               liblinear
libbs2b                 liblockfile
libbson                 liblqr
libbtbb                 libltc
libcapn                 liblunar
libcddb                 libmaa
libmagic                libtextcat
libmaxminddb                libtomcrypt
libmetalink             libtommath
libmikmod               libtorrent
libming                 libtorrent-rasterbar
libmms                  libtrace
libmodbus               libunistring
libmongoclient              libunwind-headers
libmonome               libusb
libmowgli               libusrsctp
libmp3splt              libutf
libmpd                  libuv
libmpeg2                libuvc
libmrss                 libvbucket
libmtp                  libvidstab
libmusicbrainz              libvirt
libnatpmp               libvo-aacenc
libnids                 libvoikko
libntlm                 libvpx
libnxml                 libwbxml
liboauth                libwebsockets
libofx                  libwmf
liboil                  libxc
libopendkim             libxdiff
liboping                libxmi
libosip                 libxml++
libowfat                libxml2
libp11                  libxmlsec1
libpano                 libxmp
libpcl                  libxslt
libpgm                  libxspf
libpoker-eval               libyubikey
libpqxx                 libzdb
libpst                  libzzip
libpuzzle               lilypond
libquicktime                liquibase
libquvi                 llvm
libqxt                  logstash
librasterlite               lorem
libraw                  lsyncd
libre                   luarocks
libreadline-java            luvit
librem                  macvim
libreplaygain               malaga
libresample             mariadb
librsvg                 markdown
librtlsdr               maven
libsass                 mbelib
libscrypt               md5sha1sum
libshout                mdf2iso
libsigsegv              mdr
libslax                 mecab-ko
libsmf                  mecab-ko-dic
libsmi                  meld
libsodium               mercurial
libspatialite               mesalib-glw
libspiro                mess
libssh                  metaproxy
libstxxl                minidlna
libsvg                  mkvdts2ac3
libsvg-cairo                mkvtoolnix
libsvm                  mlt
libswiften              mongo-c
libtasn1                mongodb
libtermkey              mongrel2
libtess2                moreutils
mp3fs                   picolisp
mp3wrap                 pidcat
mpd                 pike
mpg123                  pinentry
mpgtx                   pixman
mpich2                  plt-racket
mplayer                 pngcrush
msitools                pngpaste
mu                  poco
multimarkdown               podofo
muparser                poppler
mutt                    postgresql
mysql                   predictionio
mytop                   premake
n                   primesieve
nagios                  proj
namazu                  protobuf-c
nanopb-generator            pstoedit
nasm                    pyenv
ncmpc                   pyenv-virtualenv
neo4j                   pylucene
netpbm                  pypy
newick-utils                pyqt
newlisp                 python
nexus                   python3
nginx                   q
ngrok                   qbs
ninja                   qemu
node                    qjson
nodebrew                qpdf
notmuch                 qt5
npth                    quilt
nsq                 qwt
nss                 r3
nvm                 rabbitmq
nzbget                  rainbarf
offline-imap                rbenv-binstubs
ola                 rebar
opam                    reclass
open-ocd                redis
open-sp                 regina-rexx
openconnect             rethinkdb
opensc                  rhash
openssl                 riak
orc                 riemann
orientdb                rtmpdump
osxfuse                 ruby
pam_yubico              ruby-build
pandoc                  rust
pandoc-citeproc             s-lang
pango                   s3cmd
parallel                saltstack
parrot                  sbcl
pass                    sbuild
passenger               scala
pazpar2                 scamper
pdflib-lite             scheme48
pdnsrec                 scm-manager
pebble-sdk              scons
percona-server              screenfetch
percona-toolkit             sdf
perl-build              sdl
pgpool-ii               sdl_gfx
phantomjs               sdl_image
phoronix-test-suite         sdl_mixer
pianobar                sdl_ttf
sec                 transmission
selenium-server-standalone      tuntap
shadowsocks-libev           typesafe-activator
shapelib                ucspi-tcp
shared-mime-info            udis86
shellcheck              ume
sickbeard               unac
signing-party               unoconv
simgrid                 unpaper
simple-tiles                uriparser
smake                   uwsgi
smartmontools               vala
snapraid                vera++
snort                   verilator
socat                   vert.x
solr                    vifm
sox                 vim
spatialite-gui              vimpager
spatialite-tools            vimpc
spawn-fcgi              vit
spdylay                 vowpal-wabbit
speedtest_cli               vsftpd
sphinx                  watchman
spidermonkey                wdiff
spring-loaded               webp
sqlite                  wimlib
sqlitebrowser               wine
srecord                 winetricks
ssss                    winexe
stanford-parser             wireshark
star                    writerperfect
strongswan              wrk
stunnel                 wxpython
subversion              x264
suomi-malaga-voikko         x265
surfraw                 x3270
svdlibc                 xlslib
swftools                xmlformat
swi-prolog              xmlsh
sysbench                xmlstarlet
sysdig                  xmount
t1lib                   xmp
ta-lib                  xorriso
tabbed                  xournal
tcpreplay               xplanet
terminal-notifier           xplanetfx
tesseract               xrootd
the_silver_searcher         yajl
tiff2png                yaml-cpp
tinc                    yara
tinyxml2                yarp
tmux-mem-cpu-load           yaz
tnef                    yle-dl
tomcat                  youtube-dl
tomcat-native               z80dasm
tor                 zabbix
tpp                 zsh-completions
trafficserver               zxcc
==> Deleted Formulae
hllib        libspotify   pjsip        play     texmacs
$ brew outdated | grep -q xctool && brew upgrade xctool

The command "grep -q xctool" failed and exited with 1 during .
sarahhodne commented 10 years ago

Thanks for opening this. We just found out today that this command won't actually work, and we're working on finding a different command that does work.

sarahhodne commented 10 years ago

I think this will work, but I haven't tested it yet, and it feels a bit awkward:

if brew outdated --quiet | grep -qx <package-name>; then brew upgrade <package-name>; fi

So, for xctool:

if brew outdated --quiet | grep -qx xctool; then brew upgrade xctool; fi
klaaspieter commented 10 years ago

Just tested this in my project, works flawlessly.

sarahhodne commented 10 years ago

Okay, thanks, I'll update the docs. If someone has a better suggestion for the command I'm all ears.