Skip to content
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

Document how to build rustc under the same conditions as in CI #447

Open
gnzlbg opened this issue Sep 18, 2019 · 2 comments
Open

Document how to build rustc under the same conditions as in CI #447

gnzlbg opened this issue Sep 18, 2019 · 2 comments
Labels
A-contribution-workflows Area: contribution workflows A-devex Area: contributor developer experience C-CI Category: CI for this repo E-hard Difficulty: might require advanced knowledge T-compiler Relevant to compiler team T-infra Relevant to infra team

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Sep 18, 2019

Sometimes the CI build fails, and when one tries running it locally, it succeeds.

@mati865 mentions here that one can build locally on linux under the same conditions as CI by doing:

DEPLOY=1 ./src/ci/docker/run.sh dist-x86_64-linux.

This other user had to use this instead:

#!/bin/bash

# Clean up from previous build
rm -rf build

# Configuration which is always enabled
export RUST_RELEASE_CHANNEL=nightly
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-manage-submodules"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-locked-deps"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-cargo-native-static"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units-std=1"

# Deploy configuration
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1"

RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"

RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.jemalloc"

# Configure and make
./configure $RUST_CONFIGURE_ARGS
make -j $(nproc)

we should document exactly how to try to reproduce a CI failure locally inside docker, and then how to try to reproduce it outside docker but still using all other options that are set in CI but not by default (like using jemalloc instead of the system allocator).

This information should be complemented with a fix to #443 that explains how to attach a debugger on these scenarios.

@jieyouxu jieyouxu added T-infra Relevant to infra team C-CI Category: CI for this repo A-contribution-workflows Area: contribution workflows E-hard Difficulty: might require advanced knowledge labels Nov 3, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Nov 3, 2024

Triage: the linux CI jobs have docker images which make those easy, but Tier 2 failures and non-Linux (e.g. macOS, apple, windows) CI job failures still make this problematic.

@jieyouxu jieyouxu added T-compiler Relevant to compiler team A-devex Area: contributor developer experience labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contribution-workflows Area: contribution workflows A-devex Area: contributor developer experience C-CI Category: CI for this repo E-hard Difficulty: might require advanced knowledge T-compiler Relevant to compiler team T-infra Relevant to infra team
Projects
None yet
Development

No branches or pull requests

2 participants