Extend travis build matrix to include bundled/static

Doubles the number of builds, unfortunately, but it should
cover all the common linkage scenarios, except for macos
frameworks, which I'm not sure I know enough about to handle.

Also autoformats travis.yml and splits the SDL archive extraction
and installation out to a shell script
This commit is contained in:
Reynisdrangar
2018-09-29 14:15:56 -04:00
committed by Drew Pirrone-Brusse
parent 7351450842
commit 5da894bd43
2 changed files with 47 additions and 38 deletions
+28 -38
View File
@@ -1,47 +1,37 @@
language: rust
sudo: required
rust:
- beta
- nightly
- stable
- beta
- nightly
- stable
os:
- linux
- osx
- linux
- osx
env:
matrix:
- CI_BUILD_FEATURES="bundled"
- CI_BUILD_FEATURES="gfx image ttf mixer"
global:
- RUST_TEST_THREADS=1
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- LD_LIBRARY_PATH: "/usr/local/lib"
- secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8=
install:
- wget https://www.libsdl.org/release/SDL2-2.0.8.tar.gz -O sdl2.tar.gz
- tar xzf sdl2.tar.gz
- pushd SDL2-* && ./configure && make && sudo make install && popd
- wget -q https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
- wget -q https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
- wget -q https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.tar.gz
- wget -q -O SDL2_gfx-1.0.1.tar.gz https://sourceforge.net/projects/sdl2gfx/files/SDL2_gfx-1.0.1.tar.gz/download
- tar xzf SDL2_ttf-*.tar.gz
- tar xzf SDL2_image-*.tar.gz
- tar xzf SDL2_mixer-*.tar.gz
- tar xzf SDL2_gfx-*.tar.gz
- pushd SDL2_ttf-* && ./configure && make && sudo make install && popd
- pushd SDL2_image-* && ./configure && make && sudo make install && popd
- pushd SDL2_mixer-* && ./configure && make && sudo make install && popd
- pushd SDL2_gfx-* && ./autogen.sh && ./configure && make && sudo make install && popd
- if [[ $CI_BUILD_FEATURES != *"bundled"* ]]; then bash scripts/travis-install-sdl2.sh; fi
before_script:
- shopt -s expand_aliases
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then alias pip=pip2; fi
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH &&
export PATH=~/Library/Python/2.7/bin:$PATH
- shopt -s expand_aliases
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then alias pip=pip2; fi
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH &&
export PATH=~/Library/Python/2.7/bin:$PATH
script:
- |
travis-cargo build -- --features "gfx image ttf mixer" &&
travis-cargo build -- --examples --features "gfx image ttf mixer" &&
travis-cargo test -- --features "gfx image ttf mixer" &&
travis-cargo --only stable doc -- --features "gfx image ttf mixer"
- |
travis-cargo build -- --features "${CI_BUILD_FEATURES}" &&
travis-cargo build -- --examples --features "${CI_BUILD_FEATURES}" &&
travis-cargo test -- --features "${CI_BUILD_FEATURES}" &&
travis-cargo --only stable doc -- --features "${CI_BUILD_FEATURES}"
after_success:
- travis-cargo --only stable doc-upload
env:
global:
- RUST_TEST_THREADS=1
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- LD_LIBRARY_PATH: "/usr/local/lib"
- secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8=
- travis-cargo --only stable doc-upload
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -xueo pipefail
wget https://www.libsdl.org/release/SDL2-2.0.8.tar.gz -O sdl2.tar.gz
tar xzf sdl2.tar.gz
pushd SDL2-* && ./configure && make && sudo make install && popd
wget -q https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
wget -q https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
wget -q https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.tar.gz
wget -q -O SDL2_gfx-1.0.1.tar.gz https://sourceforge.net/projects/sdl2gfx/files/SDL2_gfx-1.0.1.tar.gz/download
tar xzf SDL2_ttf-*.tar.gz
tar xzf SDL2_image-*.tar.gz
tar xzf SDL2_mixer-*.tar.gz
tar xzf SDL2_gfx-*.tar.gz
pushd SDL2_ttf-* && ./configure && make && sudo make install && popd
pushd SDL2_image-* && ./configure && make && sudo make install && popd
pushd SDL2_mixer-* && ./configure && make && sudo make install && popd
pushd SDL2_gfx-* && ./autogen.sh && ./configure && make && sudo make install && popd