mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
Docker build tasks separated into multiple steps
This commit is contained in:
60
.github/workflows/build-release.yml
vendored
60
.github/workflows/build-release.yml
vendored
@@ -12,23 +12,59 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build Docker images
|
||||
run: |
|
||||
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 .
|
||||
docker build -t shadowsocks-rust:mips-unknown-linux-musl -f Dockerfile.mips-unknown-linux-musl .
|
||||
docker build -t shadowsocks-rust:mipsel-unknown-linux-musl -f Dockerfile.mipsel-unknown-linux-musl .
|
||||
|
||||
- name: Install cross
|
||||
run: cargo install cross
|
||||
- name: Build releases
|
||||
|
||||
- name: Build x86_64-pc-windows-gnu
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
./build-release
|
||||
docker build -t shadowsocks-rust:x86_64-pc-windows-gnu -f Dockerfile.x86_64-pc-windows-gnu .
|
||||
./build-release -t shadowsocks-rust:x86_64-pc-windows-gnu
|
||||
|
||||
- name: Build x86_64-unknown-linux-musl
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:x86_64-unknown-linux-musl -f Dockerfile.x86_64-unknown-linux-musl .
|
||||
./build-release -t shadowsocks-rust:x86_64-unknown-linux-musl
|
||||
|
||||
- name: Build x86_64-unknown-linux-gnu
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:x86_64-unknown-linux-gnu -f Dockerfile.x86_64-unknown-linux-gnu .
|
||||
./build-release -t shadowsocks-rust:x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Build arm-unknown-linux-gnueabihf
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:arm-unknown-linux-gnueabihf -f Dockerfile.arm-unknown-linux-gnueabihf .
|
||||
./build-release -t shadowsocks-rust:arm-unknown-linux-gnueabihf
|
||||
|
||||
- name: Build aaarch64-unknown-linux-gnu
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:aaarch64-unknown-linux-gnu -f Dockerfile.aaarch64-unknown-linux-gnu .
|
||||
./build-release -t shadowsocks-rust:aaarch64-unknown-linux-gnu
|
||||
|
||||
- name: Build mips-unknown-linux-musl
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:mips-unknown-linux-musl -f Dockerfile.mips-unknown-linux-musl .
|
||||
./build-release -t shadowsocks-rust:mips-unknown-linux-musl
|
||||
|
||||
- name: Build mipsel-unknown-linux-musl
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
cd build
|
||||
docker build -t shadowsocks-rust:mipsel-unknown-linux-musl -f Dockerfile.mipsel-unknown-linux-musl .
|
||||
./build-release -t shadowsocks-rust:mipsel-unknown-linux-musl
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: releases
|
||||
|
||||
@@ -19,3 +19,9 @@ image = "shadowsocks-rust:arm-unknown-linux-gnueabihf"
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
image = "shadowsocks-rust:aarch64-unknown-linux-gnu"
|
||||
|
||||
[target.mips-unknown-linux-musl]
|
||||
image = "shadowsocks-rust:mips-unknown-linux-musl"
|
||||
|
||||
[target.mipsel-unknown-linux-musl]
|
||||
image = "shadowsocks-rust:mipsel-unknown-linux-musl"
|
||||
|
||||
@@ -49,13 +49,16 @@ function build() {
|
||||
|
||||
EXTRA_FLAG=""
|
||||
if [[ "$TARGET" == "mips"* ]]; then
|
||||
# This is because `ring` doesn't support MIPS
|
||||
# https://github.com/shadowsocks/shadowsocks-rust/issues/273
|
||||
# https://github.com/briansmith/ring/issues/562
|
||||
EXTRA_FEATURES="sodium rc4 aes-cfb aes-ctr local-http local-http-native-tls local-tunnel local-socks4 local-redir"
|
||||
EXTRA_FLAG="--no-default-features"
|
||||
fi
|
||||
|
||||
cross build --target "${TARGET}" \
|
||||
--features "aes-pmac-siv openssl-vendored ${EXTRA_FEATURES}" \
|
||||
${EXTRA_FLAG} \
|
||||
${EXTRA_FLAG} \
|
||||
--release
|
||||
|
||||
if [[ $? != "0" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user