Skip to content

Commit 2eea256

Browse files
committed
Build linux release using musl
1 parent d5323a3 commit 2eea256

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.taskcluster.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,17 @@ tasks:
233233
command:
234234
- "/bin/bash"
235235
- "-cx"
236-
- "git clone --recursive --quiet ${repository} &&
236+
- "apt-get update &&
237+
apt-get install -y musl &&
238+
rustup target add x86_64-unknown-linux-musl &&
239+
git clone --recursive --quiet ${repository} &&
237240
cd rust-code-analysis &&
238241
git -c advice.detachedHead=false checkout --recurse-submodules ${head_rev} &&
239-
cargo build --all --release &&
240-
cargo package --all-features &&
241-
pushd rust-code-analysis-cli && cargo package --all-features && popd &&
242-
pushd rust-code-analysis-web && cargo package --all-features && popd &&
243-
cd target/release &&
242+
env CC=\"gcc\" CXX=\"g++\" cargo build --workspace --release --target x86_64-unknown-linux-musl &&
243+
env CC=\"gcc\" CXX=\"g++\" cargo package --all-features --target x86_64-unknown-linux-musl &&
244+
pushd rust-code-analysis-cli && env CC=\"gcc\" CXX=\"g++\" cargo package --all-features --target x86_64-unknown-linux-musl && popd &&
245+
pushd rust-code-analysis-web && env CC=\"gcc\" CXX=\"g++\" cargo package --all-features --target x86_64-unknown-linux-musl && popd &&
246+
cd target/x86_64-unknown-linux-musl/release &&
244247
strip rust-code-analysis-cli rust-code-analysis-web &&
245248
tar -zvcf /rust-code-analysis-linux-cli-x86_64.tar.gz rust-code-analysis-cli &&
246249
tar -zvcf /rust-code-analysis-linux-web-x86_64.tar.gz rust-code-analysis-web"

0 commit comments

Comments
 (0)