Skip to content

Adding VersionStream for rust-1.85 #43406

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

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions rust-1.85.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
package:
name: rust-1.85
version: "1.85.0"
epoch: 0
description: "Empowering everyone to build reliable and efficient software."
copyright:
- license: Apache-2.0 AND MIT
resources:
cpu: 16
memory: 16Gi
dependencies:
runtime:
- libLLVM-19
provides:
- rust=${{package.full-version}}

environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- clang-19
- cmake
- coreutils
- curl-dev
- file
- libLLVM-19
- libssh2-dev
- libxml2-dev
- llvm-19
- llvm-19-dev
- openssl-dev
- patch
- python3
- rust~1.84
- samurai
- wasi-libc
- xz-dev
- zlib-dev

pipeline:
- uses: fetch
with:
uri: https://static.rust-lang.org/dist/rustc-${{package.version}}-src.tar.xz
expected-sha256: d542c397217b5ba5bac7eb274f5ca62d031f61842c3ba4cc5328c709c38ea1e7
extract: false

- runs: |
tar -xJf rustc-${{package.version}}-src.tar.xz
rm rustc-${{package.version}}-src.tar.xz

- runs: |
export CFLAGS="$CFLAGS -O2 -I/usr/lib/llvm-19/include"
export CXXFLAGS="$CXXFLAGS -O2 -I/usr/lib/llvm-19/include"
export OPENSSL_NO_VENDOR=1
export RUST_BACKTRACE=1
export ARCH=${{host.triplet.rust}}
cd rustc-${{package.version}}-src

./configure \
--host="${ARCH}" \
--target="${ARCH}" \
--prefix="/usr" \
--release-channel="stable" \
--enable-local-rust \
--local-rust-root="/usr" \
--llvm-root="/usr/lib/llvm-19" \
--llvm-config="/usr/lib/llvm-19/bin/llvm-config" \
--disable-docs \
--enable-extended \
--tools="cargo,src,clippy,rustfmt,rustdoc" \
--enable-llvm-link-shared \
--enable-option-checking \
--enable-locked-deps \
--enable-profiler \
--enable-vendor \
--dist-compression-formats=gz \
--python="python3" \
--set="rust.musl-root=/usr" \
--set="rust.codegen-units=1" \
--set="rust.codegen-units-std=1" \
--set="target.${ARCH}.musl-root=/usr" \
--set="target.${ARCH}.crt-static=false" \
--set="target.${ARCH}.musl-root=/usr" \
--set="target.${ARCH}.crt-static=false"

- runs: |
cd rustc-${{package.version}}-src
sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml
sed 's|deny(warnings,|deny(|' -i src/bootstrap/src/lib.rs
mkdir -p "${{targets.destdir}}/usr"
unset CARGO_PROFILE_RELEASE_LTO
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_PANIC
unset CARGO_PROFILE_RELEASE_CODEGEN_UNITS
export CFLAGS="$CFLAGS -O2 -Iusr/include/llvm-19"
export CXXFLAGS="$CXXFLAGS -O2 -I/usr/include/llvm-19"
export OPENSSL_NO_VENDOR=1
export RUST_BACKTRACE=1
DESTDIR=${{targets.destdir}} python3 ./x.py install --jobs $(nproc)

- uses: strip

# delete uneeded files eg uninstalltion
- runs: |
rm ${{targets.destdir}}/usr/lib/rustlib/components
rm ${{targets.destdir}}/usr/lib/rustlib/install.log
rm ${{targets.destdir}}/usr/lib/rustlib/rust-installer-version
rm ${{targets.destdir}}/usr/lib/rustlib/uninstall.sh
rm ${{targets.destdir}}/usr/lib/rustlib/manifest-*

- name: ensure libraries are executable for melange SCA provides generation
runs: |
chmod +x ${{targets.destdir}}/usr/lib/*.so

update:
enabled: true
github:
identifier: rust-lang/rust
use-tag: true
tag-filter: 1.85.

test:
environment:
contents:
packages:
- gcc
- glibc-dev
pipeline:
- name: Verify rustc installation
runs: |
rustc --version || exit 1
cargo --help
cargo-clippy --version
cargo-clippy --help
cargo-fmt --version
cargo-fmt --help
clippy-driver --version
clippy-driver --help
rust-gdbgui --help
rustc --help
rustdoc --help
rustfmt --version
rustfmt --help
- name: Verify cargo installation
runs: |
cargo --version || exit 1
- name: Compile and run Hello World
runs: |
cat <<'EOF' > hello.rs
fn main() {
println!("Hello, World!");
}
EOF
rustc hello.rs
./hello | grep -q "Hello, World!" || exit 1
- name: Cargo project creation and run
runs: |
cargo new hello_cargo --bin
cd hello_cargo
cargo run | grep -q "Hello, world!" || exit 1
- name: Verify rustdoc installation
runs: |
rustdoc --version || exit 1
Loading