Skip to content

Joshua's CI playground #76797

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Try building in CI
  • Loading branch information
shepmaster authored and jyn514 committed Sep 16, 2020
commit 03027f0267cc98da81a2e9425010ef2621860c44
4 changes: 4 additions & 0 deletions src/ci/azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ steps:
condition: and(succeeded(), not(variables.SKIP_JOB))
displayName: Install awscli

- bash: sudo xcode-select -s $SELECT_XCODE
condition: and(succeeded(), variables.SELECT_XCODE, not(variables.SKIP_JOB))
displayName: Select Xcode version

- bash: src/ci/scripts/run-build-from-ci.sh
timeoutInMinutes: 600
env:
Expand Down
27 changes: 27 additions & 0 deletions src/ci/azure-pipelines/try.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,30 @@ jobs:
vmImage: ubuntu-16.04
steps:
- bash: echo "We're running this job since bors is still gating on Azure"

- job: macOS
timeoutInMinutes: 600
pool:
vmImage: macos-10.15
steps:
- template: steps/run.yml
strategy:
matrix:
# This target only needs to support 11.0 and up as nothing else supports the hardware
dist-aarch64-apple:
SCRIPT: ./x.py dist -vvvvvvvvvv
INITIAL_RUST_CONFIGURE_ARGS: >-
--build=x86_64-apple-darwin
--host=aarch64-apple-darwin
--target=aarch64-apple-darwin
--enable-sanitizers
--enable-profiler
--set rust.jemalloc
--set llvm.ninja=false
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
SELECT_XCODE: /Applications/Xcode_12_beta.app
SDKROOT: /Applications/Xcode_12_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
MACOSX_DEPLOYMENT_TARGET: 11.0
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
NO_LLVM_ASSERTIONS: 1
NO_DEBUG_ASSERTIONS: 1
1 change: 1 addition & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
rm -rf build
fi

echo $SRC/configure $RUST_CONFIGURE_ARGS
$SRC/configure $RUST_CONFIGURE_ARGS

retry make prepare
Expand Down
26 changes: 17 additions & 9 deletions src/ci/scripts/install-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
LLVM_VERSION="10.0.0"

if isMacOS; then
curl -f "${MIRRORS_BASE}/clang%2Bllvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz" | tar xJf -
if [[ -s ${SELECT_XCODE} ]]; then
bin="${SELECT_XCODE}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"

ciCommandSetEnv CC "$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin/bin/clang"
ciCommandSetEnv CXX "$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin/bin/clang++"
ciCommandSetEnv CC "${bin}/clang"
ciCommandSetEnv CXX "${bin}/clang++"
else
file="${MIRRORS_BASE}/clang%2Bllvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz"
curl -f "${file}" | tar xJf -

# macOS 10.15 onwards doesn't have libraries in /usr/include anymore: those
# are now located deep into the filesystem, under Xcode's own files. The
# native clang is configured to use the correct path, but our custom one
# doesn't. This sets the SDKROOT environment variable to the SDK so that
# our own clang can figure out the correct include path on its own.
ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)"
ciCommandSetEnv CC "$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin/bin/clang"
ciCommandSetEnv CXX "$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin/bin/clang++"

# macOS 10.15 onwards doesn't have libraries in /usr/include anymore: those
# are now located deep into the filesystem, under Xcode's own files. The
# native clang is configured to use the correct path, but our custom one
# doesn't. This sets the SDKROOT environment variable to the SDK so that
# our own clang can figure out the correct include path on its own.
ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)"
fi

# Configure `AR` specifically so rustbuild doesn't try to infer it as
# `clang-ar` by accident.
Expand Down
42 changes: 21 additions & 21 deletions src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
//! Check for external package sources. Allow only vendorable packages.

use std::fs;
//use std::fs;
use std::path::Path;

/// List of allowed sources for packages.
const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crates.io-index\""];
//const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crates.io-index\""];

/// Checks for external package sources. `root` is the path to the directory that contains the
/// workspace `Cargo.toml`.
pub fn check(root: &Path, bad: &mut bool) {
// `Cargo.lock` of rust.
let path = root.join("Cargo.lock");
pub fn check(_root: &Path, _bad: &mut bool) {
// // `Cargo.lock` of rust.
// let path = root.join("Cargo.lock");

// Open and read the whole file.
let cargo_lock = t!(fs::read_to_string(&path));
// // Open and read the whole file.
// let cargo_lock = t!(fs::read_to_string(&path));

// Process each line.
for line in cargo_lock.lines() {
// Consider only source entries.
if !line.starts_with("source = ") {
continue;
}
// // Process each line.
// for line in cargo_lock.lines() {
// // Consider only source entries.
// if !line.starts_with("source = ") {
// continue;
// }

// Extract source value.
let source = line.splitn(2, '=').nth(1).unwrap().trim();
// // Extract source value.
// let source = line.splitn(2, '=').nth(1).unwrap().trim();

// Ensure source is allowed.
if !ALLOWED_SOURCES.contains(&&*source) {
println!("invalid source: {}", source);
*bad = true;
}
}
// // Ensure source is allowed.
// if !ALLOWED_SOURCES.contains(&&*source) {
// println!("invalid source: {}", source);
// *bad = true;
// }
// }
}