linux-gnu target is now built with docker

ref #275, cross docker's glibc version is 2.15
This commit is contained in:
zonyitoo
2020-07-05 01:09:33 +08:00
parent ad12d59d12
commit 1ae41274ad
3 changed files with 14 additions and 10 deletions

View File

@@ -37,13 +37,6 @@ jobs:
- /usr/local/cargo/registry
- ./target
key: cargo-cache-{{ arch }}-{{ checksum "rust-version" }}-{{ checksum "Cargo.lock" }}
- store_artifacts:
path: ./build/release
destination: releases
- persist_to_workspace:
root: build
paths:
- release
build-windows:
executor: windows/default
@@ -160,6 +153,7 @@ jobs:
cd build
docker build -t shadowsocks-rust:x86_64-pc-windows-gnu -f Dockerfile.x86_64-pc-windows-gnu .
docker build -t shadowsocks-rust:x86_64-unknown-linux-musl -f Dockerfile.x86_64-unknown-linux-musl .
docker build -t shadowsocks-rust:x86_64-unknown-linux-gnu -f Dockerfile.x86_64-unknown-linux-gnu .
docker build -t shadowsocks-rust:arm-unknown-linux-gnueabihf -f Dockerfile.arm-unknown-linux-gnueabihf .
docker build -t shadowsocks-rust:aarch64-unknown-linux-gnu -f Dockerfile.aarch64-unknown-linux-gnu .
- run:
@@ -181,7 +175,7 @@ jobs:
command: |
cd build
./build-release
no_output_timeout: 1h
no_output_timeout: 2h
- save_cache:
paths:
- /usr/local/cargo/registry
@@ -241,7 +235,6 @@ workflows:
only: /^v\d+\.\d+\.\d+(-alpha\.\d+)?$/
- publish-github-releases:
requires:
- build-linux
- build-windows
- build-docker
filters:

View File

@@ -0,0 +1,3 @@
FROM rustembedded/cross:x86_64-unknown-linux-gnu
ENV RUSTFLAGS="-Ctarget-feature=+aes,+ssse3"

View File

@@ -20,7 +20,15 @@ while getopts "t:" opt; do
done
if [[ "${#targets[@]}" == "0" ]]; then
targets=("x86_64-unknown-linux-musl" "x86_64-pc-windows-gnu" "arm-unknown-linux-gnueabihf" "aarch64-unknown-linux-gnu")
targets=(
"x86_64-unknown-linux-musl"
"x86_64-unknown-linux-gnu"
"x86_64-pc-windows-gnu"
"arm-unknown-linux-gnueabihf" # armhf, hard
"aarch64-unknown-linux-gnu"
)
fi
function build() {