Add android x86 and x86_64 targets

This commit is contained in:
Frank Denis 2018-02-22 23:25:52 +01:00
parent 5e93de34aa
commit 14ebe60bff
1 changed files with 22 additions and 5 deletions

View File

@ -10,7 +10,7 @@ go:
script:
- gimme --list
- echo $TRAVIS_GO_VERSION
- echo $TRAVIS_GO_VERSION
- cd dnscrypt-proxy
- go clean
@ -144,19 +144,33 @@ script:
- tar czpvf dnscrypt-proxy-macos-${TRAVIS_TAG:-dev}.tar.gz macos
- go clean
- env CC=arm-linux-androideabi-clang CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 go build -ldflags="-s -w"
- env CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 go build -ldflags="-s -w"
- mkdir android-arm
- ln dnscrypt-proxy android-arm/
- cp ../LICENSE example-dnscrypt-proxy.toml example-*.txt android-arm/
- zip -9 -r dnscrypt-proxy-android_arm-${TRAVIS_TAG:-dev}.zip android-arm
- go clean
- env CC=aarch64-linux-android-clang CGO_ENABLED=1 GOOS=android GOARCH=arm64 go build -ldflags="-s -w"
- env CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ CGO_ENABLED=1 GOOS=android GOARCH=arm64 go build -ldflags="-s -w"
- mkdir android-arm64
- ln dnscrypt-proxy android-arm64/
- cp ../LICENSE example-dnscrypt-proxy.toml example-*.txt android-arm64/
- zip -9 -r dnscrypt-proxy-android_arm64-${TRAVIS_TAG:-dev}.zip android-arm64
- go clean
- env CC=i686-linux-android-clang CXX=i686-linux-android-clang++ CGO_ENABLED=1 GOOS=android GOARCH=386 go build -ldflags="-s -w"
- mkdir android-i386
- ln dnscrypt-proxy android-i386/
- cp ../LICENSE example-dnscrypt-proxy.toml example-*.txt android-i386/
- zip -9 -r dnscrypt-proxy-android_i386-${TRAVIS_TAG:-dev}.zip android-i386
- go clean
- env CC=x86_64-linux-android-clang CXX=x86_64-linux-android-clang++ CGO_ENABLED=1 GOOS=android GOARCH=amd64 go build -ldflags="-s -w"
- mkdir android-x86_64
- ln dnscrypt-proxy android-x86_64/
- cp ../LICENSE example-dnscrypt-proxy.toml example-*.txt android-x86_64/
- zip -9 -r dnscrypt-proxy-android_x86_64-${TRAVIS_TAG:-dev}.zip android-x86_64
- ls -l dnscrypt-proxy-*.tar.gz dnscrypt-proxy-*.zip
deploy:
@ -186,8 +200,11 @@ before_install:
- NDK_STANDALONE=$HOME/ndk-standalone-${NDK_VER}
- MAKE_TOOLCHAIN=$NDK_TOOLS/build/tools/make_standalone_toolchain.py
- python $MAKE_TOOLCHAIN --arch arm --api 21 --install-dir $NDK_STANDALONE/arm
- python $MAKE_TOOLCHAIN --arch arm64 --api 21 --install-dir $NDK_STANDALONE/arm64
- for arch in x86 x86_64 arm arm64; do
python $MAKE_TOOLCHAIN --arch $arch --api 21 --install-dir $NDK_STANDALONE/$arch;
PATH=$PATH:$NDK_STANDALONE/$arch/bin;
done
- rm -rf $NDK_TOOLS
- PATH=$PATH:$NDK_STANDALONE/arm/bin