Skip to content

Commit 003d143

Browse files
reynisdrangarpyrrho
authored andcommitted
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
1 parent 96fb48c commit 003d143

File tree

2 files changed

+47
-38
lines changed

2 files changed

+47
-38
lines changed

.travis.yml

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,37 @@
11
language: rust
22
sudo: required
33
rust:
4-
- beta
5-
- nightly
6-
- stable
4+
- beta
5+
- nightly
6+
- stable
77
os:
8-
- linux
9-
- osx
8+
- linux
9+
- osx
10+
env:
11+
matrix:
12+
- CI_BUILD_FEATURES="bundled"
13+
- CI_BUILD_FEATURES="gfx image ttf mixer"
14+
global:
15+
- RUST_TEST_THREADS=1
16+
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
17+
- LD_LIBRARY_PATH: "/usr/local/lib"
18+
- secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8=
19+
1020
install:
11-
- wget https://www.libsdl.org/release/SDL2-2.0.8.tar.gz -O sdl2.tar.gz
12-
- tar xzf sdl2.tar.gz
13-
- pushd SDL2-* && ./configure && make && sudo make install && popd
14-
- wget -q https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
15-
- wget -q https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
16-
- wget -q https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.tar.gz
17-
- wget -q -O SDL2_gfx-1.0.1.tar.gz https://sourceforge.net/projects/sdl2gfx/files/SDL2_gfx-1.0.1.tar.gz/download
18-
- tar xzf SDL2_ttf-*.tar.gz
19-
- tar xzf SDL2_image-*.tar.gz
20-
- tar xzf SDL2_mixer-*.tar.gz
21-
- tar xzf SDL2_gfx-*.tar.gz
22-
- pushd SDL2_ttf-* && ./configure && make && sudo make install && popd
23-
- pushd SDL2_image-* && ./configure && make && sudo make install && popd
24-
- pushd SDL2_mixer-* && ./configure && make && sudo make install && popd
25-
- pushd SDL2_gfx-* && ./autogen.sh && ./configure && make && sudo make install && popd
21+
- if [[ $CI_BUILD_FEATURES != *"bundled"* ]]; then bash scripts/travis-install-sdl2.sh; fi
2622

2723
before_script:
28-
- shopt -s expand_aliases
29-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then alias pip=pip2; fi
30-
- |
31-
pip install 'travis-cargo<0.2' --user &&
32-
export PATH=$HOME/.local/bin:$PATH &&
33-
export PATH=~/Library/Python/2.7/bin:$PATH
24+
- shopt -s expand_aliases
25+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then alias pip=pip2; fi
26+
- |
27+
pip install 'travis-cargo<0.2' --user &&
28+
export PATH=$HOME/.local/bin:$PATH &&
29+
export PATH=~/Library/Python/2.7/bin:$PATH
3430
script:
35-
- |
36-
travis-cargo build -- --features "gfx image ttf mixer" &&
37-
travis-cargo build -- --examples --features "gfx image ttf mixer" &&
38-
travis-cargo test -- --features "gfx image ttf mixer" &&
39-
travis-cargo --only stable doc -- --features "gfx image ttf mixer"
31+
- |
32+
travis-cargo build -- --features "${CI_BUILD_FEATURES}" &&
33+
travis-cargo build -- --examples --features "${CI_BUILD_FEATURES}" &&
34+
travis-cargo test -- --features "${CI_BUILD_FEATURES}" &&
35+
travis-cargo --only stable doc -- --features "${CI_BUILD_FEATURES}"
4036
after_success:
41-
- travis-cargo --only stable doc-upload
42-
env:
43-
global:
44-
- RUST_TEST_THREADS=1
45-
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
46-
- LD_LIBRARY_PATH: "/usr/local/lib"
47-
- secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8=
37+
- travis-cargo --only stable doc-upload

scripts/travis-install-sdl2.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -xueo pipefail
4+
5+
wget https://www.libsdl.org/release/SDL2-2.0.8.tar.gz -O sdl2.tar.gz
6+
tar xzf sdl2.tar.gz
7+
pushd SDL2-* && ./configure && make && sudo make install && popd
8+
wget -q https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
9+
wget -q https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
10+
wget -q https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.tar.gz
11+
wget -q -O SDL2_gfx-1.0.1.tar.gz https://sourceforge.net/projects/sdl2gfx/files/SDL2_gfx-1.0.1.tar.gz/download
12+
tar xzf SDL2_ttf-*.tar.gz
13+
tar xzf SDL2_image-*.tar.gz
14+
tar xzf SDL2_mixer-*.tar.gz
15+
tar xzf SDL2_gfx-*.tar.gz
16+
pushd SDL2_ttf-* && ./configure && make && sudo make install && popd
17+
pushd SDL2_image-* && ./configure && make && sudo make install && popd
18+
pushd SDL2_mixer-* && ./configure && make && sudo make install && popd
19+
pushd SDL2_gfx-* && ./autogen.sh && ./configure && make && sudo make install && popd

0 commit comments

Comments
 (0)