-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0db219
commit cafa3ff
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# Step 1: Build the Docker image | ||
echo "Building the Docker image..." | ||
docker build -t rust-builder-general tools/rust-builder/general | ||
|
||
# Step 2: Run the Docker container and execute the builder script | ||
echo "Running the Docker container..." | ||
docker run --rm -v "$(pwd)":/app rust-builder bash -c "cd /app && ./tools/rust-builder/general/builder.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM debian:10-slim | ||
|
||
# Install Rust building environment | ||
RUN apt update && apt install -y curl build-essential gcc libssl-dev bash musl-tools mingw-w64 | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
RUN source $HOME/.cargo/env | ||
|
||
# Add toolchains for building for gnu[x86_64, aarch64, armv7l], musl[x86_64], and windows[x86_64, aarch64] | ||
RUN rustup target add \ | ||
x86_64-unknown-linux-gnu \ | ||
aarch64-unknown-linux-gnu \ | ||
armv7-unknown-linux-gnueabihf \ | ||
x86_64-unknown-linux-musl \ | ||
x86_64-pc-windows-gnu \ | ||
|
||
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Build for platforms | ||
cargo build --release --target x86_64-unknown-linux-gnu | ||
cargo build --release --target aarch64-unknown-linux-gnu | ||
cargo build --release --target armv7-unknown-linux-gnueabihf | ||
cargo build --release --target x86_64-unknown-linux-musl | ||
cargo build --release --target x86_64-pc-windows-gnu |