File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ [target .x86_64-unknown-linux-gnu ]
2+ pre-build =[
3+ " apt-get update && apt-get install --assume-yes wget unzip" ,
4+ " wget https://github.com/protocolbuffers/protobuf/releases/download/v21.5/protoc-21.5-linux-x86_64.zip" ,
5+ " unzip protoc-21.5-linux-x86_64.zip -d /usr/local/"
6+ ]
17[target .aarch64-unknown-linux-gnu ]
28pre-build =[
39 " dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes wget unzip" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ cargo_flags=( "$@" )
1515
1616# Build the x86_64 GNU linux release
1717build_x86_64_gnu () {
18- cargo build --target x86_64-unknown-linux-gnu " ${cargo_flags[@]} "
18+ install_cross
19+ cargo clean
20+ cross build --target x86_64-unknown-linux-gnu " ${cargo_flags[@]} "
1921
2022 if [[ " ${cargo_flags[*]} " =~ " --release" ]]; then
2123 gzip_and_sum \
@@ -29,6 +31,7 @@ build_x86_64_gnu() {
2931
3032build_x86_64_musl () {
3133 sudo apt-get install -y musl-tools
34+ cargo clean
3235 cargo build --target x86_64-unknown-linux-musl " ${cargo_flags[@]} "
3336
3437 if [[ " ${cargo_flags[*]} " =~ " --release" ]]; then
@@ -63,6 +66,7 @@ install_cross() {
6366
6467build_aarch64_gnu () {
6568 install_cross
69+ cargo clean
6670 cross build --target aarch64-unknown-linux-gnu " ${cargo_flags[@]} "
6771
6872 if [[ " ${cargo_flags[*]} " =~ " --release" ]]; then
@@ -77,6 +81,7 @@ build_aarch64_gnu() {
7781
7882build_aarch64_musl () {
7983 install_cross
84+ cargo clean
8085 cross build --target aarch64-unknown-linux-musl " ${cargo_flags[@]} "
8186
8287 if [[ " ${cargo_flags[*]} " =~ " --release" ]]; then
You can’t perform that action at this time.
0 commit comments