-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
ci: Add dist-aarch64-freebsd #154265
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
base: main
Are you sure you want to change the base?
ci: Add dist-aarch64-freebsd #154265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| FROM ubuntu:22.04 | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| clang \ | ||
| make \ | ||
| ninja-build \ | ||
| file \ | ||
| curl \ | ||
| ca-certificates \ | ||
| python3 \ | ||
| git \ | ||
| cmake \ | ||
| sudo \ | ||
| bzip2 \ | ||
| xz-utils \ | ||
| texinfo \ | ||
| wget \ | ||
| libssl-dev \ | ||
| pkg-config \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY scripts/freebsd-toolchain.sh /tmp/ | ||
| RUN /tmp/freebsd-toolchain.sh aarch64 | ||
|
|
||
| COPY scripts/sccache.sh /scripts/ | ||
| RUN sh /scripts/sccache.sh | ||
|
|
||
| COPY scripts/cmake.sh /scripts/ | ||
| RUN /scripts/cmake.sh | ||
|
|
||
| ENV \ | ||
| AR_aarch64_unknown_freebsd=aarch64-unknown-freebsd13-ar \ | ||
| CC_aarch64_unknown_freebsd=aarch64-unknown-freebsd13-clang \ | ||
| CXX_aarch64_unknown_freebsd=aarch64-unknown-freebsd13-clang++ | ||
|
|
||
| ENV HOSTS=aarch64-unknown-freebsd | ||
|
|
||
| ENV RUST_CONFIGURE_ARGS="--enable-full-tools \ | ||
| --enable-extended \ | ||
| --enable-profiler \ | ||
| --enable-sanitizers \ | ||
| --disable-docs" | ||
|
|
||
| ENV SCRIPT="python3 ../x.py dist --host $HOSTS --target $HOSTS" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,19 @@ set -eux | |
|
|
||
| arch=$1 | ||
| binutils_version=2.40 | ||
| freebsd_version=12.3 | ||
| triple=$arch-unknown-freebsd12 | ||
| # FIXME: Use the same version from FreeBSD 14 | ||
|
Member
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. I lost the notifications and I'm only reviewing this PR now. Do you want to fix this before merging?
Contributor
Author
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. Ah good to know! I've been meaning to update this since FreeBSD 13 is now EOL as of this month, so this should just be using FreeBSD 14 across the board. I'll push the update tomorrow. |
||
| case $arch in | ||
| (aarch64) | ||
| freebsd_version=13.5 | ||
| triple=$arch-unknown-freebsd13 | ||
| freebsd_date=2025-03-07 | ||
| ;; | ||
| (*) | ||
| freebsd_version=12.3 | ||
| triple=$arch-unknown-freebsd12 | ||
| freebsd_date=2022-05-06 | ||
| ;; | ||
| esac | ||
| sysroot=/usr/local/$triple | ||
|
|
||
| hide_output() { | ||
|
|
@@ -45,6 +56,7 @@ mkdir -p "$sysroot" | |
| case $arch in | ||
| (x86_64) freebsd_arch=amd64 ;; | ||
| (i686) freebsd_arch=i386 ;; | ||
| (aarch64) freebsd_arch=arm64 ;; | ||
| esac | ||
|
|
||
| files_to_extract=( | ||
|
|
@@ -61,7 +73,7 @@ done | |
|
|
||
| # Originally downloaded from: | ||
| # URL=https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz | ||
| URL=https://ci-mirrors.rust-lang.org/rustc/2022-05-06-freebsd-${freebsd_version}-${freebsd_arch}-base.txz | ||
| URL=https://ci-mirrors.rust-lang.org/rustc/${freebsd_date}-freebsd-${freebsd_version}-${freebsd_arch}-base.txz | ||
| curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}" | ||
|
|
||
| # Clang can do cross-builds out of the box, if we give it the right | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
can we use a more recent ubuntu? Or do we need ubuntu 22 for some reason?
View changes since the review
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.
I'm pretty sure it could be any ubuntu, shouldn't matter that much. I can give it a try with whichever version you think is most appropriate.
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.
I would prefer the latest lts:
26.04. But24.04works as well!