diff options
-rw-r--r-- | .cirrus.yml | 12 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 222 | ||||
-rw-r--r-- | .github/workflows/test_tokio.yml | 129 | ||||
-rw-r--r-- | azure-pipelines.yml | 121 | ||||
-rw-r--r-- | ci/azure-cargo-check.yml | 29 | ||||
-rw-r--r-- | ci/azure-check-docs.yml | 15 | ||||
-rw-r--r-- | ci/azure-check-features.yml | 38 | ||||
-rw-r--r-- | ci/azure-check-minrust.yml | 14 | ||||
-rw-r--r-- | ci/azure-clippy.yml | 16 | ||||
-rw-r--r-- | ci/azure-cross-compile.yml | 44 | ||||
-rw-r--r-- | ci/azure-deploy-docs.yml | 39 | ||||
-rw-r--r-- | ci/azure-install-rust.yml | 40 | ||||
-rw-r--r-- | ci/azure-is-release.yml | 9 | ||||
-rw-r--r-- | ci/azure-loom.yml | 29 | ||||
-rw-r--r-- | ci/azure-miri.yml | 23 | ||||
-rw-r--r-- | ci/azure-patch-crates.yml | 16 | ||||
-rw-r--r-- | ci/azure-rustfmt.yml | 18 | ||||
-rw-r--r-- | ci/azure-test-build.yml | 17 | ||||
-rw-r--r-- | ci/azure-test-integration.yml | 28 | ||||
-rw-r--r-- | ci/azure-test-nightly.yml | 19 | ||||
-rw-r--r-- | ci/azure-test-stable.yml | 64 | ||||
-rw-r--r-- | ci/azure-tsan.yml | 34 | ||||
-rw-r--r-- | ci/patch.toml | 7 | ||||
-rw-r--r-- | ci/tsan | 39 | ||||
-rw-r--r-- | tokio/src/io/util/async_read_ext.rs | 4 | ||||
-rw-r--r-- | tokio/src/time/tests/test_delay.rs | 2 |
26 files changed, 225 insertions, 803 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index 7a5f9a6d..fa035e81 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -19,18 +19,6 @@ task: - | echo "~~~~ rustc --version ~~~~" rustc --version - - # Remove any existing patch statements - mv Cargo.toml Cargo.toml.bck - sed -n '/\[patch.crates-io\]/q;p' Cargo.toml.bck > Cargo.toml - - # Patch all crates - cat ci/patch.toml >> Cargo.toml - - # Print `Cargo.toml` for debugging - echo "~~~~ Cargo.toml ~~~~" - cat Cargo.toml - echo "~~~~~~~~~~~~~~~~~~~~" test_script: - . $HOME/.cargo/env - cargo test --all diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..33ac957c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,222 @@ +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +name: CI + +env: + RUSTFLAGS: -Dwarnings + RUST_BACKTRACE: 1 + nightly: nightly-2020-07-12 + minrust: 1.39.0 + +jobs: + test: + name: test tokio full + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - windows-latest + - ubuntu-latest + - macos-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + run: rustup update stable + - name: Install cargo-hack + run: cargo install cargo-hack + + # Run `tokio` with `full` features. This excludes testing utilities which + # can alter the runtime behavior of Tokio. + - name: test tokio full + run: cargo test --features full + working-directory: tokio + + # Check `tokio` with `full + parking_lot` to make sure it compiles. + - name: check tokio full,parking_lot + run: cargo check --features full,parking_lot + working-directory: tokio + + # Test **all** crates in the workspace with all features. + - name: test all --all-features + run: cargo test --workspace --all-features + + # Run integration tests for each feature + - name: test tests-integration --each-feature + run: cargo hack test --each-feature + working-directory: tests-integration + + # Run macro build tests + - name: test tests-build --each-feature + run: cargo hack test --each-feature + working-directory: tests-build + + test-unstable: + name: test tokio full --unstable + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - windows-latest + - ubuntu-latest + - macos-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + run: rustup update stable + + # Run `tokio` with "unstable" cfg flag. + - name: test tokio full --cfg unstable + run: cargo test --features full + working-directory: tokio + env: + RUSTFLAGS: '--cfg tokio_unstable' + + miri: + name: miri + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.nightly }} + override: true + - name: Install Miri + run: | + set -e + rustup component add miri + cargo miri setup + rm -rf tokio/tests + + - name: miri + run: cargo miri test --features rt-core,rt-threaded,rt-util,sync -- -- task + working-directory: tokio + + cross: + name: cross + runs-on: ubuntu-latest + strategy: + matrix: + target: + - i686-unknown-linux-gnu + - powerpc-unknown-linux-gnu + - powerpc64-unknown-linux-gnu + - mips-unknown-linux-gnu + - arm-linux-androideabi + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + override: true + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: check + args: --workspace --target ${{ matrix.target }} + + features: + name: features + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.nightly }} + override: true + - name: Install cargo-hack + run: cargo install cargo-hack + + - name: check --each-feature + run: cargo hack check --all --each-feature -Z avoid-dev-deps + + # Try with unstable feature flags + - name: check --each-feature --unstable + run: cargo hack check --all --each-feature -Z avoid-dev-deps + env: + RUSTFLAGS: --cfg tokio_unstable + + minrust: + name: minrust + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.minrust }} + override: true + + - name: "test --workspace --all-features" + run: cargo check --workspace --all-features + + fmt: + name: fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + run: rustup update stable + - name: Install rustfmt + run: rustup component add rustfmt + + # Check fmt + - name: "rustfmt --check" + # Workaround for rust-lang/cargo#7732 + run: rustfmt --check --edition 2018 $(find . -name '*.rs' -print) + + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + run: rustup update stable + - name: Install clippy + run: rustup component add clippy + + # Run clippy + - name: "clippy --all" + run: cargo clippy --all --tests + + docs: + name: docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.nightly }} + override: true + + - name: "doc --lib --all-features" + run: cargo doc --lib --no-deps --all-features + env: + RUSTDOCFLAGS: --cfg docsrs + + loom: + name: loom + runs-on: ubuntu-latest + strategy: + matrix: + scope: + - --skip loom_pool + - loom_pool::group_a + - loom_pool::group_b + - loom_pool::group_c + - loom_pool::group_d + steps: + - uses: actions/checkout@v2 + - name: Install Rust + run: rustup update stable + + - name: loom ${{ matrix.scope }} + run: cargo test --lib --release --features full -- --nocapture $SCOPE + working-directory: tokio + env: + RUSTFLAGS: --cfg loom --cfg tokio_unstable + LOOM_MAX_PREEMPTIONS: 2 + SCOPE: ${{ matrix.scope }} diff --git a/.github/workflows/test_tokio.yml b/.github/workflows/test_tokio.yml deleted file mode 100644 index d6d32b8f..00000000 --- a/.github/workflows/test_tokio.yml +++ /dev/null @@ -1,129 +0,0 @@ -on: - push: - branches: ["master"] - pull_request: - branches: ["master"] - -name: Test tokio - -env: - RUSTFLAGS: -Dwarnings - RUST_BACKTRACE: 1 - nightly: nightly-2020-01-25 - -jobs: - test_tokio: - name: Test tokio full - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - windows-latest - - ubuntu-latest - - macos-latest - steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update stable - - # Run `tokio` with only `full` - - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path ${{ github.workspace }}/tokio/Cargo.toml --features full - name: tokio - cargo test --features full - - # Run `tokio` with "unstable" cfg flag - - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path ${{ github.workspace }}/tokio/Cargo.toml --features full - env: - RUSTFLAGS: '--cfg tokio_unstable' - name: tokio - cargo test --features full --cfg tokio_unstable - - test_cross_subcrates: - name: Test ${{ matrix.crate }} (${{ matrix.os }}) all-features - runs-on: ${{ matrix.os }} - strategy: - matrix: - crate: - - tokio - - tests-integration - os: - - windows-latest - - ubuntu-latest - - macos-latest - include: - - crate: tokio-macros - os: ubuntu-latest - - crate: tokio-test - os: ubuntu-latest - - crate: tokio-util - os: ubuntu-latest - - crate: examples - os: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update stable - - # Run with all crate features - - name: ${{ matrix.crate }} - cargo test --all-features - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features - - # Check benches - - name: ${{ matrix.crate }} - cargo check --benches - uses: actions-rs/cargo@v1 - with: - command: check - args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features --benches - - - name: Patch Cargo.toml - shell: bash - run: | - set -e - - # Remove any existing patch statements - mv Cargo.toml Cargo.toml.bck - sed -n '/\[patch.crates-io\]/q;p' Cargo.toml.bck > Cargo.toml - - # Patch all crates - cat ci/patch.toml >> Cargo.toml - - # Print `Cargo.toml` for debugging - echo "~~~~ Cargo.toml ~~~~" - cat Cargo.toml - echo "~~~~~~~~~~~~~~~~~~~~" - - # Run with all crate features - - name: ${{ matrix.crate }} - cargo test --all-features - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features - - test_integration: - name: Integration tests - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - windows-latest - - ubuntu-latest - - macos-latest - steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update stable - - run: cargo install cargo-hack - name: Install cargo-hack - - uses: actions-rs/cargo@v1 - name: cargo hack test --each-feature - with: - command: hack - args: test --manifest-path ${{ github.workspace }}/tests-integration/Cargo.toml --each-feature diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ba0b9da3..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,121 +0,0 @@ -trigger: ["master"] -pr: ["master"] - -variables: - RUSTFLAGS: -Dwarnings - nightly: nightly-2020-05-29 - -jobs: -# Test top level crate -- template: ci/azure-test-stable.yml - parameters: - name: test_tokio - rust: stable - displayName: Test tokio - cross: true - crates: - - tokio - - tests-integration - -# Test sub crates -- template: ci/azure-test-stable.yml - parameters: - name: test_linux - displayName: Test sub crates - - rust: stable - crates: - - tokio-macros - - tokio-test - - tokio-util - - examples - -# Run integration tests -- template: ci/azure-test-integration.yml - parameters: - name: test_integration - displayName: Integration tests - rust: stable - -# Run tests from `tests-build`. This requires a different process -- template: ci/azure-test-build.yml - parameters: - name: test_build - displayName: Test build permutations - rust: stable - -# Run miri tests -- template: ci/azure-miri.yml - parameters: - name: miri - rust: $(nightly) - -# Try cross compiling -- template: ci/azure-cross-compile.yml - parameters: - name: cross - rust: stable - -# Check each feature works properly -- template: ci/azure-check-features.yml - parameters: - rust: $(nightly) - name: check_features - -# This represents the minimum Rust version supported by -# Tokio. Updating this should be done in a dedicated PR and -# cannot be greater than two 0.x releases prior to the -# current stable. -# -# Tests are not run as tests may require newer versions of -# rust. -- template: ci/azure-check-minrust.yml - parameters: - name: minrust - rust: 1.39.0 - -# Check formatting -- template: ci/azure-rustfmt.yml - parameters: - rust: stable - name: rustfmt - -# Apply clippy lints to all crates -- template: ci/azure-clippy.yml - parameters: - rust: stable - name: clippy - -# Check doc generation -- template: ci/azure-check-docs.yml - parameters: - rust: $(nightly) - name: docs - -# - template: ci/azure-tsan.yml -# parameters: -# name: tsan -# rust: stable - -# Run loom tests -- template: ci/azure-loom.yml - parameters: - name: loom - rust: stable - -- template: ci/azure-deploy-docs.yml - parameters: - rust: stable - dependsOn: - - rustfmt - - docs - - clippy - - test_tokio - - test_linux - - test_integration - - test_build - - loom - - miri - - cross - - minrust - - check_features -# - tsan diff --git a/ci/azure-cargo-check.yml b/ci/azure-cargo-check.yml deleted file mode 100644 index 5bf7af20..00000000 --- a/ci/azure-cargo-check.yml +++ /dev/null @@ -1,29 +0,0 @@ -parameters: - noDefaultFeatures: '--no-default-features' - -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - pool: - vmImage: ubuntu-16.04 - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - template: azure-is-release.yml - - - ${{ each crate in parameters.crates }}: - - ${{ each feature in crate.value }}: - - script: cargo check ${{ parameters.noDefaultFeatures }} --features ${{ feature }} - displayName: Check `${{ crate.key }}`, features = ${{ feature }} - workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} - condition: and(succeeded(), not(variables['isRelease'])) - - - template: azure-patch-crates.yml - - - ${{ each crate in parameters.crates }}: - - ${{ each feature in crate.value }}: - - script: cargo check ${{ parameters.noDefaultFeatures }} --features ${{ feature }} - displayName: Check `${{ crate.key }}`, features = ${{ feature }} - workingDirectory: $(Build.SourcesDirectory)/${{ crate.key }} diff --git a/ci/azure-check-docs.yml b/ci/azure-check-docs.yml deleted file mode 100644 index 6f94f339..00000000 --- a/ci/azure-check-docs.yml +++ /dev/null @@ -1,15 +0,0 @@ -jobs: -# Check docs -- job: ${{ parameters.name }} - displayName: Check docs - pool: - vmImage: ubuntu-16.04 - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: | - RUSTDOCFLAGS="--cfg docsrs" cargo doc --lib --no-deps --all-features - displayName: Check docs - diff --git a/ci/azure-check-features.yml b/ci/azure-check-features.yml deleted file mode 100644 index 98921300..00000000 --- a/ci/azure-check-features.yml +++ /dev/null @@ -1,38 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: Check features - strategy: - matrix: - Linux: - vmImage: ubuntu-16.04 - MacOS: - vmImage: macos-latest - Windows: - vmImage: vs2017-win2016 - pool: - vmImage: $(vmImage) - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - template: azure-patch-crates.yml - - - script: cargo install cargo-hack - displayName: Install cargo-hack - - # Check each feature works properly - # * --each-feature - # run for each feature which includes --no-default-features and default features of package - # * -Z avoid-dev-deps - # build without dev-dependencies to avoid https://github.com/rust-lang/cargo/issues/4866 - # tracking-issue: https://github.com/rust-lang/cargo/issues/5133 - - script: cargo hack check --all --each-feature -Z avoid-dev-deps - displayName: cargo hack check --all --each-feature - - # Try with unstable feature flags - - script: cargo hack check --all --each-feature -Z avoid-dev-deps - displayName: cargo hack check --all --each-feature - env: - RUSTFLAGS: '--cfg tokio_unstable' diff --git a/ci/azure-check-minrust.yml b/ci/azure-check-minrust.yml deleted file mode 100644 index 1a28f53b..00000000 --- a/ci/azure-check-minrust.yml +++ /dev/null @@ -1,14 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: Min supported Rust version - pool: - vmImage: ubuntu-16.04 - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - template: azure-patch-crates.yml - - - script: cargo check --all - displayName: cargo check --all diff --git a/ci/azure-clippy.yml b/ci/azure-clippy.yml deleted file mode 100644 index b843223f..00000000 --- a/ci/azure-clippy.yml +++ /dev/null @@ -1,16 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: Clippy - pool: - vmImage: ubuntu-16.04 - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - script: | - rustup component add clippy - cargo clippy --version - displayName: Install clippy - - script: | - cargo clippy --all --all-features --tests - displayName: cargo clippy --all --tests diff --git a/ci/azure-cross-compile.yml b/ci/azure-cross-compile.yml deleted file mode 100644 index 11c530ca..00000000 --- a/ci/azure-cross-compile.yml +++ /dev/null @@ -1,44 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - strategy: - matrix: - i686: - vmImage: ubuntu-16.04 - target: i686-unknown-linux-gnu - powerpc: - vmImage: ubuntu-16.04 - target: powerpc-unknown-linux-gnu - powerpc64: - vmImage: ubuntu-16.04 - target: powerpc64-unknown-linux-gnu - mips: - vmImage: ubuntu-16.04 - target: mips-unknown-linux-gnu - arm: - vmImage: ubuntu-16.04 - target: arm-linux-androideabi - pool: - vmImage: $(vmImage) - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: sudo apt-get update - displayName: apt-get update - - - script: sudo apt-get install gcc-multilib - displayName: Install gcc-multilib - - - script: cargo install cross - displayName: Install cross - - # Always patch - - template: azure-patch-crates.yml - - - script: cross check --all --target $(target) - displayName: Check source - - # - script: cross check --tests --all --target $(target) - # displayName: Check tests diff --git a/ci/azure-deploy-docs.yml b/ci/azure-deploy-docs.yml deleted file mode 100644 index 77ec1b0f..00000000 --- a/ci/azure-deploy-docs.yml +++ /dev/null @@ -1,39 +0,0 @@ -parameters: - dependsOn: [] - -jobs: -- job: documentation - displayName: 'Deploy API Documentation' - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - pool: - vmImage: 'Ubuntu 16.04' - dependsOn: - - ${{ parameters.dependsOn }} - steps: - - template: azure-install-rust.yml - parameters: - # rust_version: stable - rust_version: ${{ parameters.rust }} - - script: | - cargo doc --all --no-deps --all-features - cp -R target/doc '$(Build.BinariesDirectory)' - displayName: 'Generate Documentation' - - script: | - set -e - - git --version - ls -la - git init - git config user.name 'Deployment Bot (from Azure Pipelines)' - git config user.email 'deploy@tokio-rs.com' - git config --global credential.helper 'store --file ~/.my-credentials' - printf "protocol=https\nhost=github.com\nusername=carllerche\npassword=%s\n\n" "$GITHUB_TOKEN" | git credential-store --file ~/.my-credentials store - git remote add origin https://github.com/tokio-rs/tokio - git checkout -b gh-pages - git add . - git commit -m 'Deploy Tokio API documentation' - git push -f origin gh-pages - env: - GITHUB_TOKEN: $(githubPersonalToken) - workingDirectory: '$(Build.BinariesDirectory)' - displayName: 'Deploy Documentation' diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml deleted file mode 100644 index 4cf5ca3f..00000000 --- a/ci/azure-install-rust.yml +++ /dev/null @@ -1,40 +0,0 @@ -steps: - # Linux and macOS. - - script: | - set -e - - if [ "$RUSTUP_TOOLCHAIN" == "nightly" ]; then - echo "++ getting latest miri version" - export RUSTUP_TOOLCHAIN="nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" - echo "$RUSTUP_TOOLCHAIN" - fi - - curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain none - export PATH=$PATH:$HOME/.cargo/bin - rustup toolchain install $RUSTUP_TOOLCHAIN - rustup default $RUSTUP_TOOLCHAIN - echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" - env: - RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} - displayName: "Install rust (*nix)" - condition: not(eq(variables['Agent.OS'], 'Windows_NT')) - - # Windows. - - script: | - curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --profile minimal --default-toolchain none - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - rustup toolchain install %RUSTUP_TOOLCHAIN% - rustup default %RUSTUP_TOOLCHAIN% - echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" - env: - RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} - displayName: "Install rust (windows)" - condition: eq(variables['Agent.OS'], 'Windows_NT') - - # All platforms. - - script: | - rustup toolchain list - rustc -Vv - cargo -V - displayName: Query rust and cargo versions diff --git a/ci/azure-is-release.yml b/ci/azure-is-release.yml deleted file mode 100644 index d7271b34..00000000 --- a/ci/azure-is-release.yml +++ /dev/null @@ -1,9 +0,0 @@ -steps: - - bash: | - set -e - - if git log --no-merges -1 --format='%B' | grep -qF '[ci-release]'; then - echo "##vso[task.setvariable variable=isRelease]true" - fi - failOnStderr: true - displayName: Check if release commit diff --git a/ci/azure-loom.yml b/ci/azure-loom.yml deleted file mode 100644 index df02711b..00000000 --- a/ci/azure-loom.yml +++ /dev/null @@ -1,29 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: Loom tests - strategy: - matrix: - rest: - scope: --skip loom_pool - pool_group_a: - scope: loom_pool::group_a - pool_group_b: - scope: loom_pool::group_b - pool_group_c: - scope: loom_pool::group_c - pool_group_d: - scope: loom_pool::group_d - pool: - vmImage: ubuntu-16.04 - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: RUSTFLAGS="--cfg loom --cfg tokio_unstable" cargo test --lib --release --features "full" -- --nocapture $(scope) - env: - LOOM_MAX_PREEMPTIONS: 2 - CI: 'True' - displayName: $(scope) - workingDirectory: $(Build.SourcesDirectory)/tokio diff --git a/ci/azure-miri.yml b/ci/azure-miri.yml deleted file mode 100644 index 05bc973b..00000000 --- a/ci/azure-miri.yml +++ /dev/null @@ -1,23 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: Miri - pool: - vmImage: ubuntu-16.04 - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: | - rustup component add miri - cargo miri setup - rm -rf $(Build.SourcesDirectory)/tokio/tests - displayName: Install miri - - # TODO: enable all tests once they pass - - script: cargo miri test --features rt-core,rt-threaded,rt-util,sync -- -- task - env: - CI: 'True' - displayName: cargo miri test - workingDirectory: $(Build.SourcesDirectory)/tokio diff --git a/ci/azure-patch-crates.yml b/ci/azure-patch-crates.yml deleted file mode 100644 index 7bf96e60..00000000 --- a/ci/azure-patch-crates.yml +++ /dev/null @@ -1,16 +0,0 @@ -steps: - - script: | - set -e - - # Remove any existing patch statements - mv Cargo.toml Cargo.toml.bck - sed -n '/\[patch.crates-io\]/q;p' Cargo.toml.bck > Cargo.toml - - # Patch all crates - cat ci/patch.toml >> Cargo.toml - - # Print `Cargo.toml` for debugging - echo "~~~~ Cargo.toml ~~~~" - cat Cargo.toml - echo "~~~~~~~~~~~~~~~~~~~~" - displayName: Patch Cargo.toml diff --git a/ci/azure-rustfmt.yml b/ci/azure-rustfmt.yml deleted file mode 100644 index f8e79d72..00000000 --- a/ci/azure-rustfmt.yml +++ /dev/null @@ -1,18 +0,0 @@ -jobs: -# Check formatting -- job: ${{ parameters.name }} - displayName: Check rustfmt - pool: - vmImage: ubuntu-16.04 - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - script: | - rustup component add rustfmt - cargo fmt --version - displayName: Install rustfmt - - script: | - # Workaround for rust-lang/cargo#7732 - rustfmt --check --edition 2018 $(find . -name '*.rs' -print) - displayName: Check formatting diff --git a/ci/azure-test-build.yml b/ci/azure-test-build.yml deleted file mode 100644 index 944b9e24..00000000 --- a/ci/azure-test-build.yml +++ /dev/null @@ -1,17 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - pool: - vmImage: 'Ubuntu 16.04' - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: cargo install cargo-hack - displayName: Install cargo-hack - - - script: cargo hack test --each-feature - displayName: cargo hack test --each-feature - workingDirectory: $(Build.SourcesDirectory)/tests-build diff --git a/ci/azure-test-integration.yml b/ci/azure-test-integration.yml deleted file mode 100644 index f498a649..00000000 --- a/ci/azure-test-integration.yml +++ /dev/null @@ -1,28 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - strategy: - matrix: - Linux: - vmImage: ubuntu-16.04 - MacOS: - vmImage: macos-latest - Windows: - vmImage: vs2017-win2016 - pool: - vmImage: $(vmImage) - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - script: cargo install cargo-hack - displayName: Install cargo-hack - - # Run with all crate features - - script: cargo hack test --each-feature - env: - CI: 'True' - displayName: cargo hack test --each-feature - workingDirectory: $(Build.SourcesDirectory)/tests-integration diff --git a/ci/azure-test-nightly.yml b/ci/azure-test-nightly.yml deleted file mode 100644 index bbb44442..00000000 --- a/ci/azure-test-nightly.yml +++ /dev/null @@ -1,19 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - pool: - vmImage: ubuntu-16.04 - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust }} - - - template: azure-patch-crates.yml - - - script: cargo check --all - displayName: cargo check --all - - # Check benches - - script: cargo check --benches --all - displayName: Check benchmarks diff --git a/ci/azure-test-stable.yml b/ci/azure-test-stable.yml deleted file mode 100644 index 55aa84e0..00000000 --- a/ci/azure-test-stable.yml |