-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cross compile support to Linux and Windows OS with x86_64 archs.
- Loading branch information
Showing
5 changed files
with
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/target | ||
target* | ||
*.env | ||
*cache* |
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,10 @@ | ||
pipeline { | ||
agent { any { image 'rust:latest' } } | ||
stages { | ||
stage('build') { | ||
steps { | ||
sh 'rust --version' | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
FROM amd64/rust:latest | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN apt update | ||
RUN apt upgrade -y | ||
RUN apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN cargo install --path . | ||
ENV CARGO_TARGET_DIR=target.x86_64-linux | ||
CMD ["cargo", "build", "--release"] |
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,10 @@ | ||
FROM rust:latest | ||
|
||
WORKDIR /app | ||
RUN apt update | ||
RUN apt upgrade -y | ||
RUN apt install -y g++-mingw-w64-x86-64 | ||
RUN rustup target add x86_64-pc-windows-gnu | ||
RUN rustup toolchain install stable-x86_64-pc-windows-gnu | ||
ENV CARGO_TARGET_DIR=target/target.x86_64-windows | ||
CMD ["cargo", "build", "--release", "--target", "x86_64-pc-windows-gnu"] |