Skip to content

ci: move tests from x86_64-gnu-llvm-19 job to aarch64 #141576

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 1 commit into from
May 28, 2025
Merged
Show file tree
Hide file tree
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
58 changes: 58 additions & 0 deletions src/ci/docker/host-aarch64/aarch64-gnu-llvm-19/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM ubuntu:24.10

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
g++ \
make \
ninja-build \
file \
curl \
ca-certificates \
python3 \
git \
cmake \
sudo \
gdb \
llvm-19-tools \
llvm-19-dev \
libedit-dev \
libssl-dev \
pkg-config \
zlib1g-dev \
xz-utils \
nodejs \
mingw-w64 \
# libgccjit dependencies
flex \
libmpfr-dev \
libgmp-dev \
libmpc3 \
libmpc-dev \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

# We are disabling CI LLVM since this builder is intentionally using a host
# LLVM, rather than the typical src/llvm-project LLVM.
ENV NO_DOWNLOAD_CI_LLVM 1
ENV EXTERNAL_LLVM 1

# Using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \
--build=aarch64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-19 \
--enable-llvm-link-shared \
--set rust.randomize-layout=true \
--set rust.thin-lto-import-instr-limit=10

COPY scripts/shared.sh /scripts/

ARG SCRIPT_ARG

COPY scripts/stage_2_test_set1.sh /tmp/
COPY scripts/stage_2_test_set2.sh /tmp/

ENV SCRIPT "/tmp/${SCRIPT_ARG}"
4 changes: 2 additions & 2 deletions src/ci/docker/scripts/x86_64-gnu-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -ex

# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
../x.py --stage 2 test --skip src/tools/tidy
# NOTE: intentionally uses `x`, and `x.ps1` to make sure they work on Linux.
# Make sure that `x.py` is tested elsewhere.

# Run the `mir-opt` tests again but this time for a 32-bit target.
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
Expand Down
12 changes: 11 additions & 1 deletion src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,17 @@ pr:
env:
ENABLE_GCC_CODEGEN: "1"
DOCKER_SCRIPT: x86_64-gnu-llvm.sh
<<: *job-linux-16c
<<: *job-linux-4c
- name: aarch64-gnu-llvm-19-1
env:
IMAGE: aarch64-gnu-llvm-19
DOCKER_SCRIPT: stage_2_test_set1.sh
<<: *job-aarch64-linux-8c
- name: aarch64-gnu-llvm-19-2
env:
IMAGE: aarch64-gnu-llvm-19
DOCKER_SCRIPT: stage_2_test_set2.sh
<<: *job-aarch64-linux
- name: x86_64-gnu-tools
<<: *job-linux-36c-codebuild

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/by-value-non-immediate-argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ min-gdb-version: 13.0
//@ compile-flags:-g
//@ ignore-windows-gnu: #128973
//@ ignore-aarch64-unknown-linux-gnu (gdb tries to read from 0x0; FIXME: #128973)

// === GDB TESTS ===================================================================================

Expand Down
2 changes: 2 additions & 0 deletions tests/run-make/mte-ffi/bar.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// FIXME(#141600) the mte-ffi test doesn't fail in aarch64-gnu

#ifndef __BAR_H
#define __BAR_H

Expand Down
4 changes: 2 additions & 2 deletions tests/run-make/mte-ffi/bar_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <stdint.h>
#include "bar.h"

extern void foo(char*);
extern void foo(float*);

void bar(char *ptr) {
void bar(float *ptr) {
if (((uintptr_t)ptr >> 56) != 0x1f) {
fprintf(stderr, "Top byte corrupted on Rust -> C FFI boundary!\n");
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/mte-ffi/bar_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

extern void foo(unsigned int *);

void bar(char *ptr) {
void bar(unsigned int *ptr) {
if (((uintptr_t)ptr >> 56) != 0x1f) {
fprintf(stderr, "Top byte corrupted on Rust -> C FFI boundary!\n");
exit(1);
Expand Down
3 changes: 2 additions & 1 deletion tests/run-make/mte-ffi/bar_string.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "bar.h"

extern void foo(char*);
Expand Down Expand Up @@ -32,7 +33,7 @@ int main(void)

// Store an arbitrary tag in bits 56-59 of the pointer (where an MTE tag may be),
// and a different value in the ignored top 4 bits.
ptr = (unsigned int *)((uintptr_t)ptr | 0x1fl << 56);
ptr = (char *)((uintptr_t)ptr | 0x1fl << 56);

if (mte_enabled()) {
set_tag(ptr);
Expand Down
Loading