diff --git a/Cargo.toml b/Cargo.toml index bf6ff2c0f9e81907f826046603ea52ad09243391..0b054a8442f8a60d0f91e0c5c455ca3459033cb0 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 023652169dce2cf57a7352905d4d5e0a372c839f..0e7803d9e5fc0fc471b08f29457080faaa70d1c2 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 28152e5d00b9972f83f772717ae803af31fcf0e7..31235538071f84d2f15c6252f2d10ee3998917e2 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 509bd6d6aec1d89828039c92a96335a1a6ac59df..c94f3dcd028689b8886cf184e4c8932fd3d12f8a 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 823c811352f776b0b96df200d1de1688fe7735ba..49abd546001c8906834bf29829e971419be4df97 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