Message ID | 1458651195-21176-3-git-send-email-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show |
On 22 March 2016 at 12:53, Alex Bennée <alex.bennee@linaro.org> wrote: > Travis has support for OSX builds. Making the setup work cleanly > involves a little hacking about with the .travis.yml file but rather > than make it too messy I've pushed all the "brew" install stuff into a > support script called ./scripts/macosx-brew.sh. > > Currently only the default ./configure ${CONFIG} is built as I'm not > sure what extra coverage would come from the other build stanzas. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > .travis.yml | 4 ++++ > scripts/macosx-brew.sh | 12 ++++++++++++ > 2 files changed, 16 insertions(+) > create mode 100755 scripts/macosx-brew.sh > > diff --git a/.travis.yml b/.travis.yml > index 18c04af..3f77bfa 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -53,6 +53,7 @@ git: > # we want to do this ourselves > submodules: false > before_install: > + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/macosx-brew.sh ; fi [[ is a bash-ism, does travis guarantee we are using bash here? (Alternatively just use single [] and the '=' operator.) > - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ > - git submodule update --init --recursive > before_script: > @@ -83,3 +84,6 @@ matrix: > - env: CONFIG="--with-coroutine=gthread" > TEST_CMD="" > compiler: gcc > + - env: CONFIG="" > + os: osx > + compiler: clang > diff --git a/scripts/macosx-brew.sh b/scripts/macosx-brew.sh > new file mode 100755 > index 0000000..fc0d588 > --- /dev/null > +++ b/scripts/macosx-brew.sh > @@ -0,0 +1,12 @@ > +#!/bin/sh You should probably be using '-e' here. Missing license/copyright info. > +# > +# Install MacOSX dependancies "dependencies". > +# > +brew update > +brew install libffi > +brew install gettext > +brew install pkg-config > +brew install glib > +brew install autoconf > +brew install automake > +brew install pixman > -- > 2.7.3 If we're going to have an extra script, we should probably either (a) note it as being for the benefit of the Travis install or (b) better document whether/how end users should use it. I think the minimal code to do it inline in .travis.yml is: - [ "$TRAVIS_OS_NAME" = "osx" ] && brew update - [ "$TRAVIS_OS_NAME" = "osx" ] && brew install libffi gettext pkg-config glib autoconf automake pixman (you could skip pixman and rely on the submodule). thanks -- PMM
Peter Maydell <peter.maydell@linaro.org> writes: > On 22 March 2016 at 12:53, Alex Bennée <alex.bennee@linaro.org> wrote: >> Travis has support for OSX builds. Making the setup work cleanly >> involves a little hacking about with the .travis.yml file but rather >> than make it too messy I've pushed all the "brew" install stuff into a >> support script called ./scripts/macosx-brew.sh. >> >> Currently only the default ./configure ${CONFIG} is built as I'm not >> sure what extra coverage would come from the other build stanzas. >> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >> --- >> .travis.yml | 4 ++++ >> scripts/macosx-brew.sh | 12 ++++++++++++ >> 2 files changed, 16 insertions(+) >> create mode 100755 scripts/macosx-brew.sh >> >> diff --git a/.travis.yml b/.travis.yml >> index 18c04af..3f77bfa 100644 >> --- a/.travis.yml >> +++ b/.travis.yml >> @@ -53,6 +53,7 @@ git: >> # we want to do this ourselves >> submodules: false >> before_install: >> + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/macosx-brew.sh ; fi > > [[ is a bash-ism, does travis guarantee we are using bash here? > (Alternatively just use single [] and the '=' operator.) Well I copied it directly from their docs so I'm assuming so: https://docs.travis-ci.com/user/multi-os/ > >> - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ >> - git submodule update --init --recursive >> before_script: >> @@ -83,3 +84,6 @@ matrix: >> - env: CONFIG="--with-coroutine=gthread" >> TEST_CMD="" >> compiler: gcc >> + - env: CONFIG="" >> + os: osx >> + compiler: clang >> diff --git a/scripts/macosx-brew.sh b/scripts/macosx-brew.sh >> new file mode 100755 >> index 0000000..fc0d588 >> --- /dev/null >> +++ b/scripts/macosx-brew.sh >> @@ -0,0 +1,12 @@ >> +#!/bin/sh > > You should probably be using '-e' here. > > Missing license/copyright info. > >> +# >> +# Install MacOSX dependancies > > "dependencies". > >> +# >> +brew update >> +brew install libffi >> +brew install gettext >> +brew install pkg-config >> +brew install glib >> +brew install autoconf >> +brew install automake >> +brew install pixman >> -- >> 2.7.3 > > If we're going to have an extra script, we should probably > either (a) note it as being for the benefit of the Travis install > or (b) better document whether/how end users should > use it. > > I think the minimal code to do it inline in .travis.yml is: > > - [ "$TRAVIS_OS_NAME" = "osx" ] && brew update > - [ "$TRAVIS_OS_NAME" = "osx" ] && brew install libffi gettext > pkg-config glib autoconf automake pixman Ahh fair enough, when I started down the route I didn't know how complex setting up the environment would be. I wonder if MinGW will be as easy to setup? > > (you could skip pixman and rely on the submodule). > > thanks > -- PMM -- Alex Bennée
diff --git a/.travis.yml b/.travis.yml index 18c04af..3f77bfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,7 @@ git: # we want to do this ourselves submodules: false before_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/macosx-brew.sh ; fi - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ - git submodule update --init --recursive before_script: @@ -83,3 +84,6 @@ matrix: - env: CONFIG="--with-coroutine=gthread" TEST_CMD="" compiler: gcc + - env: CONFIG="" + os: osx + compiler: clang diff --git a/scripts/macosx-brew.sh b/scripts/macosx-brew.sh new file mode 100755 index 0000000..fc0d588 --- /dev/null +++ b/scripts/macosx-brew.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Install MacOSX dependancies +# +brew update +brew install libffi +brew install gettext +brew install pkg-config +brew install glib +brew install autoconf +brew install automake +brew install pixman
Travis has support for OSX builds. Making the setup work cleanly involves a little hacking about with the .travis.yml file but rather than make it too messy I've pushed all the "brew" install stuff into a support script called ./scripts/macosx-brew.sh. Currently only the default ./configure ${CONFIG} is built as I'm not sure what extra coverage would come from the other build stanzas. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- .travis.yml | 4 ++++ scripts/macosx-brew.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 scripts/macosx-brew.sh -- 2.7.3