diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f91e6816ae426..632ade60a8093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -536,7 +536,6 @@ jobs: try: name: "try - ${{ matrix.name }}" env: - DIST_TRY_BUILD: 1 CI_JOB_NAME: "${{ matrix.name }}" CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}" @@ -553,9 +552,12 @@ jobs: strategy: matrix: include: - - name: dist-x86_64-linux - os: ubuntu-20.04-16core-64gb - env: {} + - name: dist-x86_64-msvc + env: + RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler" + SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths + DIST_REQUIRE_ALL_TOOLS: 1 + os: windows-2019-8core-32gb timeout-minutes: 600 runs-on: "${{ matrix.os }}" steps: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 2577682c57c67..320f85f4959db 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -689,15 +689,23 @@ jobs: <<: *base-ci-job name: try - ${{ matrix.name }} env: - DIST_TRY_BUILD: 1 +# DIST_TRY_BUILD: 1 <<: [*shared-ci-variables, *prod-variables] if: github.event_name == 'push' && (((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust') || ((github.ref == 'refs/heads/automation/bors/try') && github.repository == 'rust-lang/rust')) strategy: matrix: include: - - &dist-x86_64-linux - name: dist-x86_64-linux - <<: *job-linux-16c + - name: dist-x86_64-msvc + env: + RUST_CONFIGURE_ARGS: >- + --build=x86_64-pc-windows-msvc + --host=x86_64-pc-windows-msvc + --target=x86_64-pc-windows-msvc + --enable-full-tools + --enable-profiler + SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths + DIST_REQUIRE_ALL_TOOLS: 1 + <<: *job-windows-8c master: name: master diff --git a/src/tools/opt-dist/src/tests.rs b/src/tools/opt-dist/src/tests.rs index 8000c9e7fddcf..3c33cfe985da4 100644 --- a/src/tools/opt-dist/src/tests.rs +++ b/src/tools/opt-dist/src/tests.rs @@ -24,11 +24,10 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> { let host_triple = env.host_triple(); let version = find_dist_version(&dist_dir)?; - // Extract rustc, libstd, cargo and src archives to create the optimized sysroot + // Extract rustc, libstd and src archives to create the optimized sysroot let rustc_dir = extract_dist_dir(&format!("rustc-{version}-{host_triple}"))?.join("rustc"); let libstd_dir = extract_dist_dir(&format!("rust-std-{version}-{host_triple}"))? .join(format!("rust-std-{host_triple}")); - let cargo_dir = extract_dist_dir(&format!("cargo-{version}-{host_triple}"))?.join("cargo"); let extracted_src_dir = extract_dist_dir(&format!("rust-src-{version}"))?.join("rust-src"); // We need to manually copy libstd to the extracted rustc sysroot @@ -47,8 +46,6 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> { let rustc_path = rustc_dir.join("bin").join(format!("rustc{}", executable_extension())); assert!(rustc_path.is_file()); - let cargo_path = cargo_dir.join("bin").join(format!("cargo{}", executable_extension())); - assert!(cargo_path.is_file()); // Specify path to a LLVM config so that LLVM is not rebuilt. // It doesn't really matter which LLVM config we choose, because no sysroot will be compiled. @@ -65,13 +62,11 @@ change-id = 115898 [build] rustc = "{rustc}" -cargo = "{cargo}" [target.{host_triple}] llvm-config = "{llvm_config}" "#, rustc = rustc_path.to_string().replace('\\', "/"), - cargo = cargo_path.to_string().replace('\\', "/"), llvm_config = llvm_config.to_string().replace('\\', "/") ); log::info!("Using following `config.toml` for running tests:\n{config_content}"); @@ -84,6 +79,8 @@ llvm-config = "{llvm_config}" env.python_binary(), x_py.as_str(), "test", + "--build", + env.host_triple(), "--stage", "0", "tests/assembly",