build travis releases with --features=all, add an i686 linux release build

This commit is contained in:
Ted Mielczarek 2018-01-12 09:21:40 -05:00
Родитель f21435eb61
Коммит e559fb724a
2 изменённых файлов: 30 добавлений и 11 удалений

Просмотреть файл

@ -14,18 +14,18 @@ matrix:
# deployments # deployments
- env: DEPLOY=1 TARGET=x86_64-apple-darwin - env: DEPLOY=1 TARGET=x86_64-apple-darwin
script: cargo build --release --target $TARGET script: cargo build --release --target $TARGET --features=all
os: osx os: osx
- env: DEPLOY=1 TARGET=x86_64-unknown-linux-musl - env: DEPLOY=1 TARGET=x86_64-unknown-linux-musl OPENSSL_DIR=$HOME/openssl-musl
before_script: before_script: ./scripts/travis-musl-openssl.sh
- rustup target add $TARGET script: cargo build --release --target $TARGET --features=all
- curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xzf - addons:
- (cd openssl-1.0.2l && apt:
CC=musl-gcc ./Configure --prefix=$HOME/openssl-musl no-dso no-ssl2 no-ssl3 linux-x86_64 -fPIC && packages:
make -j$(nproc) && - musl-tools
make install) - env: DEPLOY=1 TARGET=i686-unknown-linux-musl OPENSSL_DIR=$HOME/openssl-musl
- export OPENSSL_DIR=$HOME/openssl-musl before_script: ./scripts/travis-musl-openssl.sh
script: cargo build --release --target $TARGET script: cargo build --release --target $TARGET --features=all
addons: addons:
apt: apt:
packages: packages:

19
scripts/travis-musl-openssl.sh Executable file
Просмотреть файл

@ -0,0 +1,19 @@
#!/bin/bash
set -vex
case "$TARGET" in
x86_64-*)
OPENSSL_TARGET=linux-x86_64
;;
i686-*)
OPENSSL_TARGET=linux-generic32
EXTRA=-m32
;;
esac
rustup target add "$TARGET"
curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xzf -
cd openssl-1.0.2l
CC=musl-gcc ./Configure --prefix="$OPENSSL_DIR" no-dso no-ssl2 no-ssl3 "$EXTRA" "$OPENSSL_TARGET" -fPIC
make -j"$(nproc)"
make install