forked from rust-cross/rust-musl-cross
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (23 loc) · 1.33 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
branches:
only:
- master
matrix:
include:
- env: IMAGE_TAG=x86_64-musl TARGET=x86_64-unknown-linux-musl OPENSSL_ARCH=linux-x86_64
- env: IMAGE_TAG=arm-musleabi TARGET=arm-unknown-linux-musleabi OPENSSL_ARCH=linux-generic32
- env: IMAGE_TAG=arm-musleabihf TARGET=arm-unknown-linux-musleabihf OPENSSL_ARCH=linux-generic32
- env: IMAGE_TAG=armv5te-musleabi TARGET=armv5te-unknown-linux-musleabi OPENSSL_ARCH=linux-generic32
- env: IMAGE_TAG=armv7-musleabihf TARGET=armv7-unknown-linux-musleabihf OPENSSL_ARCH=linux-generic32
- env: IMAGE_TAG=i686-musl TARGET=i686-unknown-linux-musl OPENSSL_ARCH=linux-generic32
- env: IMAGE_TAG=mips-musl TARGET=mips-unknown-linux-musl OPENSSL_ARCH=linux-mips32
- env: IMAGE_TAG=mipsel-musl TARGET=mipsel-unknown-linux-musl OPENSSL_ARCH=linux-mips32
script:
- export DOCKER_REPO=messense/rust-musl-cross
- echo "Building Docker image for target ${TARGET}"
- docker build --build-arg TARGET="$TARGET" --build-arg OPENSSL_ARCH="$OPENSSL_ARCH" -t $DOCKER_REPO:$IMAGE_TAG .
- docker run --rm -it -v "$(pwd)/tests":/home/rust/src $DOCKER_REPO:$IMAGE_TAG cargo build
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS && docker push $DOCKER_REPO
fi