From 6ca5bfaea17f5c48843abb46dc22771fbe5fda2d Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 28 May 2019 19:10:23 +0200 Subject: [PATCH 01/17] Setup Azure Pipelines --- .travis.yml | 256 -------------------------------------- README.md | 2 +- azure-pipelines.yml | 173 ++++++++++++++++++++++++++ ci/azure-install-rust.yml | 49 ++++++++ ci/build.sh | 42 +++++-- ci/dox.sh | 8 ++ ci/run-docker.sh | 15 ++- ci/semver.sh | 9 +- ci/style.sh | 19 +++ libc-test/build.rs | 3 +- src/unix/bsd/apple/b32.rs | 4 + src/unix/bsd/apple/b64.rs | 4 + src/unix/bsd/apple/mod.rs | 3 - 13 files changed, 309 insertions(+), 278 deletions(-) delete mode 100644 .travis.yml create mode 100644 azure-pipelines.yml create mode 100644 ci/azure-install-rust.yml create mode 100644 ci/style.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6a7ddb386bae0..0000000000000 --- a/.travis.yml +++ /dev/null @@ -1,256 +0,0 @@ -language: rust -rust: nightly -sudo: required -dist: xenial -services: docker - -stages: - - tools-and-build-and-tier1 - - tier2 - -matrix: - include: - # TOOLS - - name: "Documentation" - env: TARGET=x86_64-unknown-linux-gnu - script: sh ci/dox.sh - install: - - travis_retry rustup component add rust-src - - travis_retry cargo install xargo - stage: tools-and-build-and-tier1 - - name: "Shellcheck" - install: true - script: - - shellcheck --version - # FIXME: https://github.com/koalaman/shellcheck/issues/1591 - - shellcheck -e SC2103 ci/*.sh - stage: tools-and-build-and-tier1 - - name: "Style" - install: true - script: - - rustc ci/style.rs && ./style src - # Disabled due to rust-lang/rustfmt#3341 - #- | - # if rustup component add rustfmt-preview ; then - # cargo fmt --all -- --check - # fi - stage: tools-and-build-and-tier1 - - name: "Semver Linux" - install: travis_retry cargo +nightly install semverver - script: sh ci/semver.sh - stage: tools-and-build-and-tier1 - - name: "Semver MacOSX" - install: travis_retry cargo +nightly install semverver - script: sh ci/semver.sh - os: osx - osx_image: xcode10 - stage: tools-and-build-and-tier1 - - # BUILD stable, beta, nightly - - name: "Build Stable Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: stable - install: true - - name: "Build Beta Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: beta - install: true - - name: "Build Nightly Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: nightly - install: - - travis_retry rustup component add rust-src - - travis_retry cargo install xargo - - name: "Build Stable Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: stable - os: osx - osx_image: xcode10 - install: true - - name: "Build Beta Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: beta - os: osx - osx_image: xcode10 - install: true - - name: "Build Nightly Rust" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: nightly - os: osx - osx_image: xcode10 - install: true - - name: "Build Stable Rust 1.13.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.13.0 - install: true - - name: "Build Stable Rust 1.19.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.19.0 - install: true - - name: "Build Stable Rust 1.24.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.24.0 - install: true - - name: "Build Stable Rust 1.25.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.25.0 - install: true - - name: "Build Stable Rust 1.30.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.30.0 - install: true - - name: "Build Stable Rust 1.13.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.13.0 - os: osx - osx_image: xcode10 - install: true - - name: "Build Stable Rust 1.19.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.19.0 - os: osx - osx_image: xcode10 - install: true - - name: "Build Stable Rust 1.24.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.24.0 - os: osx - osx_image: xcode10 - install: true - - name: "Build Stable Rust 1.25.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.25.0 - os: osx - osx_image: xcode10 - install: true - - name: "Build Stable Rust 1.30.0" - script: sh ci/build.sh - stage: tools-and-build-and-tier1 - rust: 1.30.0 - os: osx - osx_image: xcode10 - install: true - - env: TARGET=i686-apple-darwin - os: osx - osx_image: xcode10 - stage: tools-and-build-and-tier1 - - env: TARGET=i686-unknown-linux-gnu - stage: tools-and-build-and-tier1 - - env: TARGET=x86_64-apple-darwin - os: osx - osx_image: xcode10 - install: true - stage: tools-and-build-and-tier1 - - env: TARGET=x86_64-unknown-linux-gnu - stage: tools-and-build-and-tier1 - install: true - - # Tier 2 targets - - env: TARGET=aarch64-linux-android - stage: tier2 - - env: TARGET=aarch64-unknown-linux-gnu - stage: tier2 - - env: TARGET=aarch64-unknown-linux-musl - stage: tier2 - - env: TARGET=arm-linux-androideabi - stage: tier2 - - env: TARGET=arm-unknown-linux-gnueabihf - stage: tier2 - - env: TARGET=arm-unknown-linux-musleabihf - stage: tier2 - - env: TARGET=asmjs-unknown-emscripten - stage: tier2 - - env: TARGET=i686-linux-android - stage: tier2 - - env: TARGET=i686-unknown-linux-musl - stage: tier2 - - env: TARGET=mips-unknown-linux-gnu - stage: tier2 - - env: TARGET=mips-unknown-linux-musl - stage: tier2 - - env: TARGET=mips64-unknown-linux-gnuabi64 - stage: tier2 - - env: TARGET=mips64el-unknown-linux-gnuabi64 - stage: tier2 - - env: TARGET=mipsel-unknown-linux-musl - stage: tier2 - - env: TARGET=powerpc-unknown-linux-gnu - stage: tier2 - - env: TARGET=powerpc64-unknown-linux-gnu - stage: tier2 - - env: TARGET=powerpc64le-unknown-linux-gnu - stage: tier2 - - env: TARGET=s390x-unknown-linux-gnu - stage: tier2 - - env: TARGET=sparc64-unknown-linux-gnu - stage: tier2 - - env: TARGET=wasm32-unknown-emscripten - stage: tier2 - - env: TARGET=x86_64-linux-android - stage: tier2 - - env: TARGET=x86_64-unknown-linux-gnux32 OPT="--release" - stage: tier2 - - env: TARGET=x86_64-unknown-linux-musl - stage: tier2 - - env: TARGET=wasm32-wasi - rust: nightly - stage: tier2 - - name: "Nintendo Switch - build libcore only" - rust: nightly - stage: tier2 - install: - - rustup component add rust-src - - (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild) - script: - - mkdir -p target - - cd target - - wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb - - sudo dpkg -i devkitpro-pacman.deb - - sudo dkp-pacman -Sy - - sudo dkp-pacman -Syu - - sudo dkp-pacman -S -v --noconfirm switch-dev devkitA64 - - export PATH="$PATH:/opt/devkitpro/devkitA64/bin" - - export PATH="$PATH:/opt/devkitpro/tools/bin" - - cd .. - # Pull the target spec up into the current directory and then build - - mv ci/switch.json switch.json - - cargo xbuild --target switch.json - - allow_failures: - - name: "Semver Linux" - - name: "Semver MacOSX" - - env: TARGET=wasm32-wasi - - env: TARGET=powerpc-unknown-linux-gnu - - env: TARGET=s390x-unknown-linux-gnu - -install: travis_retry rustup target add $TARGET - -script: - - cargo generate-lockfile --manifest-path libc-test/Cargo.toml - - if [[ $TRAVIS_OS_NAME = "linux" ]] && [[ $BUILD_ONLY != "1" ]]; then - sh ci/run-docker.sh $TARGET; - else - sh ci/run.sh $TARGET; - fi -env: - global: - secure: "e2/3QjgRN9atOuSHp22TrYG7QVKcYUWY48Hi9b60w+r1+BhPkTseIJLte7WefRhdXtqpjjUJTooKDhnurFOeHaCT+nmBgiv+FPU893sBl4bhesY4m0vgUJVbNZcs6lTImYekWVb+aqjGdgV/XAgCw7c3kPmrZV0MzGDWL64Xaps=" - -notifications: - email: - on_success: never diff --git a/README.md b/README.md index dc5ff04fccff7..4ca2e9447b937 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Travis-CI Status]][Travis-CI] [![Appveyor Status]][Appveyor] [![Cirrus-CI Status]][Cirrus-CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License] +[![Build Status](https://dev.azure.com/rust-lang/libc/_apis/build/status/rust-lang.libc?branchName=master)](https://dev.azure.com/rust-lang/libc/_build/latest?definitionId=11&branchName=master) [![Appveyor Status]][Appveyor] [![Cirrus-CI Status]][Cirrus-CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License] libc - Raw FFI bindings to platforms' system libraries ==== diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000000..00878c7519ed7 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,173 @@ +trigger: + - master + +jobs: + - job: DockerLinux + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - bash: sh ./ci/run-docker.sh $TARGET + displayName: Execute run-docker.sh + strategy: + matrix: + aarch64-unknown-linux-android: + TARGET: aarch64-linux-android + aarch64-unknown-linux-gnu: + TARGET: aarch64-unknown-linux-gnu + aarch64-unknown-linux-musl: + TARGET: aarch64-unknown-linux-musl + arm-linux-androideabi: + TARGET: arm-linux-androideabi + arm-unknown-linux-gnueabihf: + TARGET: arm-unknown-linux-gnueabihf + arm-unknown-linux-musleabihf: + TARGET: arm-unknown-linux-musleabihf + asmjs-unknown-emscripten: + TARGET: asmjs-unknown-emscripten + i686-linux-android: + TARGET: i686-linux-android + i686-unknown-linux-gnu: + TARGET: i686-unknown-linux-gnu + i686-unknown-linux-musl: + TARGET: i686-unknown-linux-musl + mips-unknown-linux-gnu: + TARGET: mips-unknown-linux-gnu + mips-unknown-linux-musl: + TARGET: mips-unknown-linux-musl + mips64-unknown-linux-gnuabi64: + TARGET: mips64-unknown-linux-gnuabi64 + mips64el-unknown-linux-gnuabi64: + TARGET: mips64el-unknown-linux-gnuabi64 + mipsel-unknown-linux-musl: + TARGET: mipsel-unknown-linux-musl + #powerpc-unknown-linux-gnu: + # TARGET: powerpc-unknown-linux-gnu + powerpc64-unknown-linux-gnu: + TARGET: powerpc64-unknown-linux-gnu + powerpc64le-unknown-linux-gnu: + TARGET: powerpc64le-unknown-linux-gnu + #s390x-unknown-linux-gnu: + # TARGET: s390x-unknown-linux-gnu + #wasm32-wasi + # TARGET: wasm32-wasi + sparc64-unknown-linux-gnu: + TARGET: sparc64-unknown-linux-gnu + wasm32-unknown-emscripten: + TARGET: wasm32-unknown-emscripten + x86_64-linux-android: + TARGET: x86_64-linux-android + x86_64-unknown-linux-gnu: + TARGET: x86_64-unknown-linux-gnu + x86_64-unknown-linux-gnux32: + TARGET: x86_64-unknown-linux-gnux32 + x86_64-unknown-linux-musl: + TARGET: x86_64-unknown-linux-musl + + - job: DockerOSX64 + pool: + vmImage: macos-10.14 + steps: + - template: ci/azure-install-rust.yml + - bash: sh ./ci/run.sh $TARGET + displayName: Execute run.sh + strategy: + matrix: + x86_64-apple-darwin: + TARGET: x86_64-apple-darwin + + - job: DockerOSX32 + pool: + vmImage: macos-10.13 + steps: + - template: ci/azure-install-rust.yml + - bash: sh ./ci/run.sh $TARGET + displayName: Execute run.sh + strategy: + matrix: + i686-apple-darwin: + TARGET: i686-apple-darwin + + - job: StyleAndDocs + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - script: sh ci/style.sh + displayName: Check style + - script: sh ci/dox.sh + displayName: Generate and upload documentation + + - job: SemverLinux + continueOnError: true + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - script: sh ci/semver.sh linux + displayName: Check breaking changes + + - job: SemverOSX + continueOnError: true + pool: + vmImage: macos-10.14 + steps: + - template: ci/azure-install-rust.yml + - script: sh ci/semver.sh osx + displayName: Check breaking changes + + - job: BuildChannelsLinux + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - script: sh ./ci/build.sh + displayName: Execute build.sh + strategy: + matrix: + stable: + TOOLCHAIN: stable + beta: + TOOLCHAIN: beta + nightly: + TOOLCHAIN: nightly + 1.13.0: + TOOLCHAIN: 1.13.0 + 1.19.0: + TOOLCHAIN: 1.19.0 + 1.24.0: + TOOLCHAIN: 1.24.0 + 1.25.0: + TOOLCHAIN: 1.25.0 + 1.30.0: + TOOLCHAIN: 1.30.0 + variables: + OS: linux + + - job: BuildChannelsOSX + pool: + vmImage: macos-10.13 + steps: + - template: ci/azure-install-rust.yml + - script: sh ./ci/build.sh + displayName: Execute build.sh + strategy: + matrix: + stable: + TOOLCHAIN: stable + beta: + TOOLCHAIN: beta + nightly: + TOOLCHAIN: nightly + 1.13.0: + TOOLCHAIN: 1.13.0 + 1.19.0: + TOOLCHAIN: 1.19.0 + 1.24.0: + TOOLCHAIN: 1.24.0 + 1.25.0: + TOOLCHAIN: 1.25.0 + 1.30.0: + TOOLCHAIN: 1.30.0 + variables: + OS: osx diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml new file mode 100644 index 0000000000000..1f4071309c700 --- /dev/null +++ b/ci/azure-install-rust.yml @@ -0,0 +1,49 @@ +steps: + - bash: | + set -ex + toolchain=$TOOLCHAIN + if [ "$toolchain" = "" ]; then + toolchain=nightly + fi + if command -v rustup; then + rustup update $toolchain + rustup default $toolchain + else + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain + echo "##vso[task.prependpath]$HOME/.cargo/bin" + fi + displayName: Install rust (unix) + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + - script: | + if not defined TOOLCHAIN set TOOLCHAIN=nightly + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET% + echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin + displayName: Install rust (windows) + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + - script: | + set -ex + if [ -n "${TARGET}" ]; then + rustup target add $TARGET + fi + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install target (unix) + - script: if defined TARGET rustup target add %TARGET% + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install target (windows) + - script: | + set -ex + rustc -Vv + cargo -V + rustup -Vv + rustup show + which rustc + which cargo + which rustup + displayName: Query rust and cargo versions + - script: | + set -ex + cargo generate-lockfile + cargo generate-lockfile --manifest-path libc-test/Cargo.toml + displayName: Generate lockfiles + diff --git a/ci/build.sh b/ci/build.sh index 00fbe35e98406..abec755d6f68c 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -5,13 +5,20 @@ set -ex -RUST=${TRAVIS_RUST_VERSION} -OS=${TRAVIS_OS_NAME} +: "${TOOLCHAIN?The TOOLCHAIN environment variable must be set.}" +: "${OS?The OS environment variable must be set.}" + +RUST=${TOOLCHAIN} echo "Testing Rust ${RUST} on ${OS}" +if [ "${TOOLCHAIN}" = "nightly" ] ; then + cargo +nightly install cargo-xbuild -Z install-upgrade + rustup component add rust-src +fi + test_target() { - CARGO="${1}" + BUILD_CMD="${1}" TARGET="${2}" NO_STD="${3}" @@ -46,21 +53,21 @@ test_target() { fi # Test that libc builds without any default features (no libstd) - "$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}" + cargo "+${RUST}" "${BUILD_CMD}" -vv $opt --no-default-features --target "${TARGET}" # Test that libc builds with default features (e.g. libstd) # if the target supports libstd if [ "$NO_STD" != "1" ]; then - "$CARGO" "+${RUST}" build -vv $opt --target "${TARGET}" + cargo "+${RUST}" "${BUILD_CMD}" -vv $opt --target "${TARGET}" fi # Test that libc builds with the `extra_traits` feature - "$CARGO" "+${RUST}" build -vv $opt --no-default-features --target "${TARGET}" \ + cargo "+${RUST}" "${BUILD_CMD}" -vv $opt --no-default-features --target "${TARGET}" \ --features extra_traits # Also test that it builds with `extra_traits` and default features: if [ "$NO_STD" != "1" ]; then - "$CARGO" "+${RUST}" build -vv $opt --target "${TARGET}" \ + cargo "+${RUST}" "${BUILD_CMD}" -vv $opt --target "${TARGET}" \ --features extra_traits fi } @@ -167,7 +174,7 @@ case "${OS}" in esac for TARGET in $TARGETS; do - test_target cargo "$TARGET" + test_target build "$TARGET" done # FIXME: https://github.com/rust-lang/rust/issues/58564 @@ -218,6 +225,23 @@ x86_64-unknown-openbsd \ if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then for TARGET in $RUST_LINUX_NO_CORE_TARGETS; do - test_target xargo "$TARGET" 1 + test_target xbuild "$TARGET" 1 done + + # Nintendo switch + cargo clean + mkdir -p target + ( + cd target + wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb + sudo dpkg -i devkitpro-pacman.deb + sudo dkp-pacman -Sy + sudo dkp-pacman -Syu + sudo dkp-pacman -S -v --noconfirm switch-dev devkitA64 + ) + cp ci/switch.json switch.json + PATH="$PATH:/opt/devkitpro/devkitA64/bin" + PATH="$PATH:/opt/devkitpro/tools/bin" + cargo xbuild --target switch.json fi + diff --git a/ci/dox.sh b/ci/dox.sh index ce5508147647c..40b7dae4440bd 100644 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -13,6 +13,14 @@ PLATFORM_SUPPORT=platform-support.md rm -rf $TARGET_DOC_DIR mkdir -p $TARGET_DOC_DIR +if ! rustc --version | grep -E "nightly" ; then + echo "Building the documentation requires a nightly Rust toolchain" + exit 1 +fi + +rustup component add rust-src +cargo +nightly install xargo -Z install-upgrade + # List all targets that do currently build successfully: # shellcheck disable=SC1003 grep '[\d|\w|-]* \\' ci/build.sh > targets diff --git a/ci/run-docker.sh b/ci/run-docker.sh index c656f5904d684..5fd00614462dc 100755 --- a/ci/run-docker.sh +++ b/ci/run-docker.sh @@ -5,6 +5,9 @@ set -ex +echo "${HOME}" +pwd + run() { echo "Building docker container for target ${1}" @@ -18,19 +21,19 @@ run() { fi docker run \ - --user "$(id -u)":"$(id -g)" \ --rm \ - --init \ - --volume "${HOME}/.cargo":/cargo \ - $kvm \ + --user "$(id -u)":"$(id -g)" \ --env CARGO_HOME=/cargo \ + --env CARGO_TARGET_DIR=/checkout/target \ + --volume "$(dirname "$(dirname "$(command -v cargo)")")":/cargo \ --volume "$(rustc --print sysroot)":/rust:ro \ --volume "$(pwd)":/checkout:ro \ --volume "$(pwd)"/target:/checkout/target \ - --env CARGO_TARGET_DIR=/checkout/target \ + $kvm \ + --init \ --workdir /checkout \ libc \ - ci/run.sh "${1}" + sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/run.sh ${1}" } if [ -z "${1}" ]; then diff --git a/ci/semver.sh b/ci/semver.sh index ac6be36f3f18e..3412501a7215b 100644 --- a/ci/semver.sh +++ b/ci/semver.sh @@ -4,10 +4,17 @@ set -ex -OS=${TRAVIS_OS_NAME} +OS=${1} echo "Testing Semver on ${OS}" +if ! rustc --version | grep -E "nightly" ; then + echo "Building semverver requires a nightly Rust toolchain" + exit 1 +fi + +cargo +nightly install semverver -Z install-upgrade + TARGETS= case "${OS}" in *linux*) diff --git a/ci/style.sh b/ci/style.sh new file mode 100644 index 0000000000000..a6a00171019e4 --- /dev/null +++ b/ci/style.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +set -ex + +rustc ci/style.rs && ./style src + +if rustup component add rustfmt-preview ; then + which rustfmt + rustfmt -V + cargo fmt --all -- --check +fi + +if shellcheck --version ; then + shellcheck -e SC2103 ci/*.sh +else + echo "shellcheck not found" + exit 1 +fi + diff --git a/libc-test/build.rs b/libc-test/build.rs index 6edbd0f2ff506..d4ad4a9a4e099 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1595,8 +1595,7 @@ fn test_freebsd(target: &str) { // These constants were removed in FreeBSD 11 (svn r262489), // and they've never had any legitimate use outside of the // base system anyway. - "CTL_MAXID" | "KERN_MAXID" | "HW_MAXID" - | "USER_MAXID" => true, + "CTL_MAXID" | "KERN_MAXID" | "HW_MAXID" | "USER_MAXID" => true, _ => false, } diff --git a/src/unix/bsd/apple/b32.rs b/src/unix/bsd/apple/b32.rs index 859809dc863a1..c05de30327d19 100644 --- a/src/unix/bsd/apple/b32.rs +++ b/src/unix/bsd/apple/b32.rs @@ -81,6 +81,10 @@ cfg_if! { } } +#[doc(hidden)] +#[deprecated(since = "0.2.55")] +pub const NET_RT_MAXID: ::c_int = 10; + pub const __PTHREAD_MUTEX_SIZE__: usize = 40; pub const __PTHREAD_COND_SIZE__: usize = 24; pub const __PTHREAD_CONDATTR_SIZE__: usize = 4; diff --git a/src/unix/bsd/apple/b64.rs b/src/unix/bsd/apple/b64.rs index 7b89fc6ab534b..2749260b04ec2 100644 --- a/src/unix/bsd/apple/b64.rs +++ b/src/unix/bsd/apple/b64.rs @@ -86,6 +86,10 @@ cfg_if! { } } +#[doc(hidden)] +#[deprecated(since = "0.2.55")] +pub const NET_RT_MAXID: ::c_int = 11; + pub const __PTHREAD_MUTEX_SIZE__: usize = 56; pub const __PTHREAD_COND_SIZE__: usize = 40; pub const __PTHREAD_CONDATTR_SIZE__: usize = 8; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 2bc18fb2160f3..24ad12bee5207 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -2178,9 +2178,6 @@ pub const PF_PPP: ::c_int = AF_PPP; pub const NET_RT_DUMP: ::c_int = 1; pub const NET_RT_FLAGS: ::c_int = 2; pub const NET_RT_IFLIST: ::c_int = 3; -#[doc(hidden)] -#[deprecated(since = "0.2.55")] -pub const NET_RT_MAXID: ::c_int = 10; pub const SOMAXCONN: ::c_int = 128; From 189ea88d04ecfc2e30c5483f42d85f5d97c62621 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Sun, 7 Jul 2019 15:25:02 +0200 Subject: [PATCH 02/17] Temporarily skip the Semver jobs --- azure-pipelines.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00878c7519ed7..a603aae8d88f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -98,23 +98,23 @@ jobs: - script: sh ci/dox.sh displayName: Generate and upload documentation - - job: SemverLinux - continueOnError: true - pool: - vmImage: ubuntu-16.04 - steps: - - template: ci/azure-install-rust.yml - - script: sh ci/semver.sh linux - displayName: Check breaking changes + #- job: SemverLinux + # continueOnError: true + # pool: + # vmImage: ubuntu-16.04 + # steps: + # - template: ci/azure-install-rust.yml + # - script: sh ci/semver.sh linux + # displayName: Check breaking changes - - job: SemverOSX - continueOnError: true - pool: - vmImage: macos-10.14 - steps: - - template: ci/azure-install-rust.yml - - script: sh ci/semver.sh osx - displayName: Check breaking changes + #- job: SemverOSX + # continueOnError: true + # pool: + # vmImage: macos-10.14 + # steps: + # - template: ci/azure-install-rust.yml + # - script: sh ci/semver.sh osx + # displayName: Check breaking changes - job: BuildChannelsLinux pool: From d03a1ff2dc55044f4ac919c2673608d65791efbe Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 9 Jul 2019 11:16:47 +0200 Subject: [PATCH 03/17] Use cargo-xbuild for building the documentation --- ci/dox.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dox.sh b/ci/dox.sh index 40b7dae4440bd..823c811352f77 100644 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -19,7 +19,7 @@ if ! rustc --version | grep -E "nightly" ; then fi rustup component add rust-src -cargo +nightly install xargo -Z install-upgrade +cargo +nightly install cargo-xbuild -Z install-upgrade # List all targets that do currently build successfully: # shellcheck disable=SC1003 @@ -50,7 +50,7 @@ while read -r target; do # If cargo doc fails, then try xargo: if ! cargo doc --target "${target}" \ --no-default-features --features extra_traits ; then - xargo doc --target "${target}" \ + cargo xdoc --target "${target}" \ --no-default-features --features extra_traits fi From 1e121314f6ef11081beda89c3638e275f2738e73 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 9 Jul 2019 11:46:26 +0200 Subject: [PATCH 04/17] Remove Appveyor --- README.md | 8 +++----- appveyor.yml | 26 -------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 appveyor.yml diff --git a/README.md b/README.md index 4ca2e9447b937..86d2fe2abe453 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://dev.azure.com/rust-lang/libc/_apis/build/status/rust-lang.libc?branchName=master)](https://dev.azure.com/rust-lang/libc/_build/latest?definitionId=11&branchName=master) [![Appveyor Status]][Appveyor] [![Cirrus-CI Status]][Cirrus-CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License] +[![Azure Status]][Azure] [![Cirrus-CI Status]][Cirrus-CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License] libc - Raw FFI bindings to platforms' system libraries ==== @@ -91,10 +91,8 @@ Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in `libc` by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. -[Travis-CI]: https://travis-ci.com/rust-lang/libc -[Travis-CI Status]: https://travis-ci.com/rust-lang/libc.svg?branch=master -[Appveyor]: https://ci.appveyor.com/project/rust-lang-libs/libc -[Appveyor Status]: https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true +[Azure Status]: https://dev.azure.com/rust-lang/libc/_apis/build/status/rust-lang.libc?branchName=master +[Azure]: https://dev.azure.com/rust-lang/libc/_build/latest?definitionId=11&branchName=master [Cirrus-CI]: https://cirrus-ci.com/github/rust-lang/libc [Cirrus-CI Status]: https://api.cirrus-ci.com/github/rust-lang/libc.svg [crates.io]: https://crates.io/crates/libc diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 2885bb1e60025..0000000000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-gnu - MSYS_BITS: 64 - ARCH: x86_64 - - TARGET: i686-pc-windows-gnu - MSYS_BITS: 32 - ARCH: i686 - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc -install: - - if NOT defined APPVEYOR_PULL_REQUEST_NUMBER if "%APPVEYOR_REPO_BRANCH%" == "master" appveyor exit - - if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%; - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo -vv test --target %TARGET% - - cargo -vv test --no-default-features --target %TARGET% - - cargo -vv test --manifest-path libc-test/Cargo.toml --target %TARGET% From 7507f5d1e08881514b6eadf5549e93713992a8e8 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 9 Jul 2019 11:24:28 +0200 Subject: [PATCH 05/17] Add windows targets --- azure-pipelines.yml | 22 ++++++++++++++++++++++ ci/azure-install-rust.yml | 3 +++ 2 files changed, 25 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a603aae8d88f8..023652169dce2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -88,6 +88,28 @@ jobs: i686-apple-darwin: TARGET: i686-apple-darwin + - job: Windows + pool: + vmImage: vs2017-win2016 + steps: + - template: ci/azure-install-rust.yml + - bash: sh ./ci/run.sh $TARGET + displayName: Execute run.sh + strategy: + matrix: + x86_64-pc-windows-gnu: + TARGET: x86_64-pc-windows-gnu + MSYS_BITS: 64 + ARCH: x86_64 + x86_64-pc-windows-msvc: + TARGET: x86_64-pc-windows-msvc + i686-pc-windows-gnu: + TARGET: i686-pc-windows-gnu + MSYS_BITS: 32 + ARCH: i686 + i686-pc-windows-msvc: + TARGET: i686-pc-windows-msvc + - job: StyleAndDocs pool: vmImage: ubuntu-16.04 diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml index 1f4071309c700..5edd0b33314cb 100644 --- a/ci/azure-install-rust.yml +++ b/ci/azure-install-rust.yml @@ -31,6 +31,9 @@ steps: - script: if defined TARGET rustup target add %TARGET% condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install target (windows) + - script: if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Fix MinGW (windows) - script: | set -ex rustc -Vv From d4bb00a544f4b81b67b4ccfd6d069f189a47ab11 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 9 Jul 2019 12:04:06 +0200 Subject: [PATCH 06/17] Use installed rustup --- ci/azure-install-rust.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml index 5edd0b33314cb..509bd6d6aec1d 100644 --- a/ci/azure-install-rust.yml +++ b/ci/azure-install-rust.yml @@ -16,9 +16,8 @@ steps: condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | if not defined TOOLCHAIN set TOOLCHAIN=nightly - curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET% - echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin + rustup update %TOOLCHAIN% + rustup default %TOOLCHAIN% displayName: Install rust (windows) condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | @@ -31,9 +30,9 @@ steps: - script: if defined TARGET rustup target add %TARGET% condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install target (windows) - - script: if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Fix MinGW (windows) + #- script: if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" + # condition: eq( variables['Agent.OS'], 'Windows_NT' ) + # displayName: Fix MinGW (windows) - script: | set -ex rustc -Vv From 9f153e971a57834c5f0ea4d9c6772d1041483169 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Tue, 9 Jul 2019 12:19:53 +0200 Subject: [PATCH 07/17] Patch mingw libraries for windows gnu targets --- Cargo.toml | 2 +- azure-pipelines.yml | 21 ++++++++++++++++----- ci/README.md | 13 +++---------- ci/azure-install-rust.yml | 36 ++++++++++++++++++++++++++++++------ ci/dox.sh | 7 ------- 5 files changed, 50 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bf6ff2c0f9e81..0b054a8442f8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ documentation = "http://doc.rust-lang.org/libc" keywords = ["libc", "ffi", "bindings", "operating", "system" ] categories = ["external-ffi-bindings", "no-std", "os"] build = "build.rs" -exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"] +exclude = ["/ci/*", "/azure-pipelines.yml"] description = """ Raw FFI bindings to platform libraries like libc. """ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 023652169dce2..0e7803d9e5fc0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,13 @@ -trigger: - - master +variables: + - group: secrets +resources: + repositories: + - repository: rustinfra + type: github + name: rust-lang/simpleinfra + endpoint: rust-lang +trigger: ["master"] +pr: ["master"] jobs: - job: DockerLinux @@ -99,13 +107,13 @@ jobs: matrix: x86_64-pc-windows-gnu: TARGET: x86_64-pc-windows-gnu - MSYS_BITS: 64 + ARCH_BITS: 64 ARCH: x86_64 x86_64-pc-windows-msvc: TARGET: x86_64-pc-windows-msvc i686-pc-windows-gnu: TARGET: i686-pc-windows-gnu - MSYS_BITS: 32 + ARCH_BITS: 32 ARCH: i686 i686-pc-windows-msvc: TARGET: i686-pc-windows-msvc @@ -118,7 +126,10 @@ jobs: - script: sh ci/style.sh displayName: Check style - script: sh ci/dox.sh - displayName: Generate and upload documentation + displayName: Generate documentation + - template: azure-configs/static-websites.yml@rustinfra + parameters: + deploy_dir: target/doc #- job: SemverLinux # continueOnError: true diff --git a/ci/README.md b/ci/README.md index 28152e5d00b99..31235538071f8 100644 --- a/ci/README.md +++ b/ci/README.md @@ -8,19 +8,12 @@ this project. First up, let's talk about the files in this directory: -* `run-travis.sh` - a shell script run by all Travis builders, this is - responsible for setting up the rest of the environment such as installing new - packages, downloading Rust target libraries, etc. +* `run-docker.sh` - a shell script run by most builders, it will execute + `run.sh` inside a Docker container configured for the target. * `run.sh` - the actual script which runs tests for a particular architecture. - Called from the `run-travis.sh` script this will run all tests for the target - specified. -* `cargo-config` - Cargo configuration of linkers to use copied into place by - the `run-travis.sh` script before builds are run. - -* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly - Travis bots to build documentation for this crate. +* `dox.sh` - build the documentation of the crate and publish it to gh-pages. * `landing-page-*.html` - used by `dox.sh` to generate a landing page for all architectures' documentation. diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml index 509bd6d6aec1d..c94f3dcd02868 100644 --- a/ci/azure-install-rust.yml +++ b/ci/azure-install-rust.yml @@ -15,9 +15,10 @@ steps: displayName: Install rust (unix) condition: ne( variables['Agent.OS'], 'Windows_NT' ) - script: | + @echo on if not defined TOOLCHAIN set TOOLCHAIN=nightly - rustup update %TOOLCHAIN% - rustup default %TOOLCHAIN% + rustup update %TOOLCHAIN%-%TARGET% + rustup default %TOOLCHAIN%-%TARGET% displayName: Install rust (windows) condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | @@ -27,13 +28,31 @@ steps: fi condition: ne( variables['Agent.OS'], 'Windows_NT' ) displayName: Install target (unix) - - script: if defined TARGET rustup target add %TARGET% + - script: | + @echo on + if defined TARGET rustup target add %TARGET% condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install target (windows) - #- script: if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - # condition: eq( variables['Agent.OS'], 'Windows_NT' ) - # displayName: Fix MinGW (windows) - script: | + @echo on + if "%ARCH%" == "i686" choco install mingw --x86 --force + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install MinGW32 (windows) + - bash: | + set -ex + gcc -print-search-dirs + find "C:\ProgramData\Chocolatey" -name "crt2*" + find "C:\ProgramData\Chocolatey" -name "dllcrt2*" + find "C:\ProgramData\Chocolatey" -name "libmsvcrt*" + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Find GCC libraries (windows) + - script: | + @echo on + if not defined TOOLCHAIN set TOOLCHAIN=nightly + if defined ARCH_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw%ARCH_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files\Rust\.rustup\toolchains\%TOOLCHAIN%-%TARGET%\lib\rustlib\%TARGET%\lib\%%I" + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Fix MinGW (windows) + - bash: | set -ex rustc -Vv cargo -V @@ -44,6 +63,11 @@ steps: which rustup displayName: Query rust and cargo versions - script: | + @echo on + where gcc + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Query gcc path + - bash: | set -ex cargo generate-lockfile cargo generate-lockfile --manifest-path libc-test/Cargo.toml diff --git a/ci/dox.sh b/ci/dox.sh index 823c811352f77..49abd546001c8 100644 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -69,10 +69,3 @@ set -x # Copy the licenses cp LICENSE-* $TARGET_DOC_DIR/ - -# If we're on travis, not a PR, and on the right branch, publish! -if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then - pip install ghp_import --install-option="--prefix=$HOME/.local" - "${HOME}/.local/bin/ghp-import" $TARGET_DOC_DIR - git push -qf "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" gh-pages -fi From 2f25959d05e50fb4a8a0c55305d7024aa473b52c Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 10 Jul 2019 15:23:39 +0200 Subject: [PATCH 08/17] Use Azure Pipelines dependsOn to stage the jobs --- azure-pipelines.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0e7803d9e5fc0..39fd377be0d7a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,22 @@ trigger: ["master"] pr: ["master"] jobs: - - job: DockerLinux + - job: DockerLinuxTier1 + pool: + vmImage: ubuntu-16.04 + steps: + - template: ci/azure-install-rust.yml + - bash: sh ./ci/run-docker.sh $TARGET + displayName: Execute run-docker.sh + strategy: + matrix: + i686-unknown-linux-gnu: + TARGET: i686-unknown-linux-gnu + x86_64-unknown-linux-gnu: + TARGET: x86_64-unknown-linux-gnu + + - job: DockerLinuxTier2 + dependsOn: DockerLinuxTier1 pool: vmImage: ubuntu-16.04 steps: @@ -35,8 +50,6 @@ jobs: TARGET: asmjs-unknown-emscripten i686-linux-android: TARGET: i686-linux-android - i686-unknown-linux-gnu: - TARGET: i686-unknown-linux-gnu i686-unknown-linux-musl: TARGET: i686-unknown-linux-musl mips-unknown-linux-gnu: @@ -65,8 +78,6 @@ jobs: TARGET: wasm32-unknown-emscripten x86_64-linux-android: TARGET: x86_64-linux-android - x86_64-unknown-linux-gnu: - TARGET: x86_64-unknown-linux-gnu x86_64-unknown-linux-gnux32: TARGET: x86_64-unknown-linux-gnux32 x86_64-unknown-linux-musl: @@ -132,6 +143,7 @@ jobs: deploy_dir: target/doc #- job: SemverLinux + # dependsOn: BuildChannelsLinux # continueOnError: true # pool: # vmImage: ubuntu-16.04 @@ -141,6 +153,7 @@ jobs: # displayName: Check breaking changes #- job: SemverOSX + # dependsOn: BuildChannelsOSX # continueOnError: true # pool: # vmImage: macos-10.14 @@ -150,6 +163,7 @@ jobs: # displayName: Check breaking changes - job: BuildChannelsLinux + dependsOn: StyleAndDocs pool: vmImage: ubuntu-16.04 steps: @@ -178,6 +192,7 @@ jobs: OS: linux - job: BuildChannelsOSX + dependsOn: StyleAndDocs pool: vmImage: macos-10.13 steps: From 23b80729e225c5fe8339dea87ff766ae36c4efbf Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 12 Jul 2019 12:35:36 +0200 Subject: [PATCH 09/17] Use matis bash script instead of batch for fixing mingw on windows --- ci/azure-install-rust.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml index c94f3dcd02868..077a05efb4e0e 100644 --- a/ci/azure-install-rust.yml +++ b/ci/azure-install-rust.yml @@ -46,10 +46,13 @@ steps: find "C:\ProgramData\Chocolatey" -name "libmsvcrt*" condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Find GCC libraries (windows) - - script: | - @echo on - if not defined TOOLCHAIN set TOOLCHAIN=nightly - if defined ARCH_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw%ARCH_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files\Rust\.rustup\toolchains\%TOOLCHAIN%-%TARGET%\lib\rustlib\%TARGET%\lib\%%I" + - bash: | + set -ex + if [[ -n ${ARCH_BITS} ]]; then + for i in crt2.o dllcrt2.o libmsvcrt.a ; do + cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw${ARCH_BITS}/${ARCH}-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/${TARGET}/lib" + done + fi condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Fix MinGW (windows) - bash: | From 3ffff3b5cabe869bfdb747562014009dbefce5a4 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Sat, 27 Jul 2019 13:27:19 +0200 Subject: [PATCH 10/17] Update end-point for rustinfra script --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 39fd377be0d7a..7a4b3d1321c18 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,7 +5,7 @@ resources: - repository: rustinfra type: github name: rust-lang/simpleinfra - endpoint: rust-lang + endpoint: gnzlbg trigger: ["master"] pr: ["master"] From e966c5e1cb2dc011cc3ee2f1961b3c872416d5fa Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Sat, 27 Jul 2019 14:21:57 +0200 Subject: [PATCH 11/17] Document disabling semverver jobs --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7a4b3d1321c18..d89cd5c3a7ef7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -142,6 +142,7 @@ jobs: parameters: deploy_dir: target/doc + # FIXME: re-enable these after the next release #- job: SemverLinux # dependsOn: BuildChannelsLinux # continueOnError: true From 59234646b7b64517c758c408f5a2d644ab5b28fe Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Sun, 28 Jul 2019 18:22:22 +0200 Subject: [PATCH 12/17] Update trigger to auto and try --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d89cd5c3a7ef7..7c7bf94ff0626 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ resources: type: github name: rust-lang/simpleinfra endpoint: gnzlbg -trigger: ["master"] +trigger: ["auto","try"] pr: ["master"] jobs: From 1a2de0ea601575630eaa518451524924199f4e3a Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 31 Jul 2019 12:31:58 +0200 Subject: [PATCH 13/17] Bors uses auto-libc; move config to ci/azure.yml --- azure-pipelines.yml => ci/azure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename azure-pipelines.yml => ci/azure.yml (99%) diff --git a/azure-pipelines.yml b/ci/azure.yml similarity index 99% rename from azure-pipelines.yml rename to ci/azure.yml index 7c7bf94ff0626..5ca3189ade1d1 100644 --- a/azure-pipelines.yml +++ b/ci/azure.yml @@ -6,7 +6,7 @@ resources: type: github name: rust-lang/simpleinfra endpoint: gnzlbg -trigger: ["auto","try"] +trigger: ["auto-libc","try"] pr: ["master"] jobs: From bc5a93e8d880773f94a55a66995a87f539a7b5f9 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 31 Jul 2019 12:41:42 +0200 Subject: [PATCH 14/17] Update azure.yml to ci/ path --- ci/azure.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/azure.yml b/ci/azure.yml index 5ca3189ade1d1..04d12dae8f316 100644 --- a/ci/azure.yml +++ b/ci/azure.yml @@ -14,7 +14,7 @@ jobs: pool: vmImage: ubuntu-16.04 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - bash: sh ./ci/run-docker.sh $TARGET displayName: Execute run-docker.sh strategy: @@ -29,7 +29,7 @@ jobs: pool: vmImage: ubuntu-16.04 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - bash: sh ./ci/run-docker.sh $TARGET displayName: Execute run-docker.sh strategy: @@ -87,7 +87,7 @@ jobs: pool: vmImage: macos-10.14 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - bash: sh ./ci/run.sh $TARGET displayName: Execute run.sh strategy: @@ -99,7 +99,7 @@ jobs: pool: vmImage: macos-10.13 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - bash: sh ./ci/run.sh $TARGET displayName: Execute run.sh strategy: @@ -111,7 +111,7 @@ jobs: pool: vmImage: vs2017-win2016 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - bash: sh ./ci/run.sh $TARGET displayName: Execute run.sh strategy: @@ -133,7 +133,7 @@ jobs: pool: vmImage: ubuntu-16.04 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - script: sh ci/style.sh displayName: Check style - script: sh ci/dox.sh @@ -149,7 +149,7 @@ jobs: # pool: # vmImage: ubuntu-16.04 # steps: - # - template: ci/azure-install-rust.yml + # - template: azure-install-rust.yml # - script: sh ci/semver.sh linux # displayName: Check breaking changes @@ -159,7 +159,7 @@ jobs: # pool: # vmImage: macos-10.14 # steps: - # - template: ci/azure-install-rust.yml + # - template: azure-install-rust.yml # - script: sh ci/semver.sh osx # displayName: Check breaking changes @@ -168,7 +168,7 @@ jobs: pool: vmImage: ubuntu-16.04 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - script: sh ./ci/build.sh displayName: Execute build.sh strategy: @@ -197,7 +197,7 @@ jobs: pool: vmImage: macos-10.13 steps: - - template: ci/azure-install-rust.yml + - template: azure-install-rust.yml - script: sh ./ci/build.sh displayName: Execute build.sh strategy: From f3d0118751bc434ada3dc20895e1ae586444172d Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 2 Aug 2019 13:44:33 +0200 Subject: [PATCH 15/17] MinGW: also copy libmingwex.a from C toolchain - by mati865 --- ci/azure-install-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml index 077a05efb4e0e..eba066923f266 100644 --- a/ci/azure-install-rust.yml +++ b/ci/azure-install-rust.yml @@ -49,7 +49,7 @@ steps: - bash: | set -ex if [[ -n ${ARCH_BITS} ]]; then - for i in crt2.o dllcrt2.o libmsvcrt.a ; do + for i in crt2.o dllcrt2.o libmingwex.a libmsvcrt.a ; do cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw${ARCH_BITS}/${ARCH}-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/${TARGET}/lib" done fi From e63e7d4180f835b7113d9550d9a485aa1858f7eb Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Mon, 5 Aug 2019 10:24:36 +0200 Subject: [PATCH 16/17] Formatting --- libc-test/test/cmsg.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libc-test/test/cmsg.rs b/libc-test/test/cmsg.rs index 8304163338608..38a8ce1508901 100644 --- a/libc-test/test/cmsg.rs +++ b/libc-test/test/cmsg.rs @@ -97,5 +97,4 @@ mod t { } } } - } From bce9075570889b0fc20aad628594db9555fa194a Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Mon, 5 Aug 2019 12:47:35 +0200 Subject: [PATCH 17/17] Temporarily disable redox target --- ci/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/build.sh b/ci/build.sh index abec755d6f68c..176c85feb6d42 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -122,6 +122,9 @@ i586-unknown-linux-musl \ x86_64-unknown-cloudabi \ " +# FIXME: temporarirly disable the redox target +# https://github.com/rust-lang/libc/issues/1457 +# x86_64-unknown-redox RUST_NIGHTLY_LINUX_TARGETS="\ aarch64-fuchsia \ armv5te-unknown-linux-gnueabi \ @@ -132,7 +135,6 @@ x86_64-fortanix-unknown-sgx \ x86_64-fuchsia \ x86_64-pc-windows-gnu \ x86_64-unknown-linux-gnux32 \ -x86_64-unknown-redox \ " RUST_OSX_TARGETS="\