-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add support for dist-loongarch64-linux #110519
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
30 changes: 30 additions & 0 deletions
30
src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
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,30 @@ | ||
FROM ubuntu:22.04 | ||
|
||
COPY scripts/cross-apt-packages.sh /scripts/ | ||
RUN sh /scripts/cross-apt-packages.sh | ||
|
||
# The latest released version does not support LoongArch. | ||
COPY scripts/crosstool-ng-git.sh /scripts/ | ||
RUN sh /scripts/crosstool-ng-git.sh | ||
|
||
COPY scripts/rustbuild-setup.sh /scripts/ | ||
RUN sh /scripts/rustbuild-setup.sh | ||
WORKDIR /tmp | ||
|
||
COPY scripts/crosstool-ng-build.sh /scripts/ | ||
COPY host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig /tmp/crosstool.defconfig | ||
RUN /scripts/crosstool-ng-build.sh | ||
|
||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
ENV PATH=$PATH:/x-tools/loongarch64-unknown-linux-gnu/bin | ||
|
||
ENV CC_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-gcc \ | ||
AR_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-ar \ | ||
CXX_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-g++ | ||
|
||
ENV HOSTS=loongarch64-unknown-linux-gnu | ||
|
||
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs | ||
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS |
14 changes: 14 additions & 0 deletions
14
src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig
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,14 @@ | ||
CT_CONFIG_VERSION="4" | ||
CT_EXPERIMENTAL=y | ||
CT_PREFIX_DIR="/x-tools/${CT_TARGET}" | ||
CT_USE_MIRROR=y | ||
CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc" | ||
CT_ARCH_LOONGARCH=y | ||
# CT_DEMULTILIB is not set | ||
CT_ARCH_USE_MMU=y | ||
CT_ARCH_ARCH="loongarch64" | ||
CT_KERNEL_LINUX=y | ||
CT_LINUX_V_5_19=y | ||
CT_GLIBC_V_2_36=y | ||
CT_CC_GCC_ENABLE_DEFAULT_PIE=y | ||
CT_CC_LANG_CXX=y |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install | |
patch \ | ||
pkg-config \ | ||
python3 \ | ||
rsync \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is used by |
||
sudo \ | ||
texinfo \ | ||
unzip \ | ||
|
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,17 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
URL=https://github.com/crosstool-ng/crosstool-ng | ||
REV=943364711a650d9b9e84c1b42c91cc0265b6ab5c | ||
|
||
mkdir crosstool-ng | ||
cd crosstool-ng | ||
git init | ||
git fetch --depth=1 ${URL} ${REV} | ||
git reset --hard FETCH_HEAD | ||
./bootstrap | ||
./configure --prefix=/usr/local | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
rm -rf crosstool-ng |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to raise this to GCC 13.1.0 now that it's released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly, although GCC 13 has been released, the upgrade for crosstool-ng is still in progress. We would like to catch up with the Rust 1.71 release, and since LoongArch CI is not dependent on GCC 13, I propose that we upgrade after crosstool-ng is ready, possibly through a new PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If crosstool-ng is ready earlier than expected, I would be happy to include it in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. I forgot we privately talked about this a while ago.