diff options
author | Haibo Huang <hhb@google.com> | 2020-07-10 20:22:56 -0700 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2020-07-10 20:22:56 -0700 |
commit | 815f544e751e7b3cdc563ca0c97849f7decf782f (patch) | |
tree | e039ea0f1d64aa1ce4ba6e632a638d4ad3c6af2b /ci | |
parent | 3ab24982d6da8a21528bd7ce8b2e675dd284b178 (diff) | |
download | bytes-815f544e751e7b3cdc563ca0c97849f7decf782f.tar.gz |
Upgrade rust/crates/bytes to 0.5.5
Change-Id: Ide2810cb2888de2899fd55127a81c685a5a037b6
Diffstat (limited to 'ci')
-rw-r--r-- | ci/azure-cross-compile.yml | 46 | ||||
-rw-r--r-- | ci/azure-deploy-docs.yml | 39 | ||||
-rw-r--r-- | ci/azure-install-rust.yml | 33 | ||||
-rw-r--r-- | ci/azure-loom.yml | 15 | ||||
-rw-r--r-- | ci/azure-test-stable.yml | 50 | ||||
-rw-r--r-- | ci/azure-tsan.yml | 26 | ||||
-rw-r--r-- | ci/test-stable.sh | 27 | ||||
-rw-r--r-- | ci/tsan.sh | 15 |
8 files changed, 42 insertions, 209 deletions
diff --git a/ci/azure-cross-compile.yml b/ci/azure-cross-compile.yml deleted file mode 100644 index be46ca3..0000000 --- a/ci/azure-cross-compile.yml +++ /dev/null @@ -1,46 +0,0 @@ -parameters: - cmd: build - rust_version: stable - -jobs: -- job: ${{ parameters.name }} - displayName: Cross - strategy: - matrix: - i686: - vmImage: ubuntu-16.04 - target: i686-unknown-linux-gnu - armv7: - vmImage: ubuntu-16.04 - target: armv7-unknown-linux-gnueabihf - powerpc: - vmImage: ubuntu-16.04 - target: powerpc-unknown-linux-gnu - powerpc64: - vmImage: ubuntu-16.04 - target: powerpc64-unknown-linux-gnu - wasm: - vmImage: ubuntu-16.04 - target: wasm32-unknown-unknown - pool: - vmImage: $(vmImage) - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{parameters.rust_version}} - - - script: cargo install cross - displayName: Install cross - condition: not(eq(variables['target'], 'wasm32-unknown-unknown')) - - - script: cross ${{ parameters.cmd }} --target $(target) - displayName: cross ${{ parameters.cmd }} --target $(target) - condition: not(eq(variables['target'], 'wasm32-unknown-unknown')) - - # WASM support - - script: | - rustup target add $(target) - cargo build --target $(target) - displayName: cargo build --target $(target) - condition: eq(variables['target'], 'wasm32-unknown-unknown') diff --git a/ci/azure-deploy-docs.yml b/ci/azure-deploy-docs.yml deleted file mode 100644 index 52ac48f..0000000 --- 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 - - script: | - cargo doc --no-deps - 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/bytes - git checkout -b gh-pages - git add . - git commit -m 'Deploy Bytes 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 0217659..0000000 --- a/ci/azure-install-rust.yml +++ /dev/null @@ -1,33 +0,0 @@ -steps: - # Linux and macOS. - - script: | - set -e - curl https://sh.rustup.rs -sSf | sh -s -- -y --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 --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-loom.yml b/ci/azure-loom.yml deleted file mode 100644 index 1db9c3a..0000000 --- a/ci/azure-loom.yml +++ /dev/null @@ -1,15 +0,0 @@ -jobs: -- job: ${{parameters.name}} - displayName: Loom tests - pool: - vmImage: ubuntu-16.04 - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{parameters.rust_version}} - - - script: RUSTFLAGS="--cfg loom" cargo test --lib - displayName: RUSTFLAGS="--cfg loom" cargo test --lib - - diff --git a/ci/azure-test-stable.yml b/ci/azure-test-stable.yml deleted file mode 100644 index e543eee..0000000 --- a/ci/azure-test-stable.yml +++ /dev/null @@ -1,50 +0,0 @@ -parameters: - cmd: test - rust_version: stable - features: [] - -jobs: -- job: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - strategy: - matrix: - Linux: - vmImage: ubuntu-16.04 - - ${{ if parameters.cross }}: - MacOS: - vmImage: macOS-10.13 - Windows: - vmImage: vs2017-win2016 - pool: - vmImage: $(vmImage) - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{parameters.rust_version}} - - # Run with default crate features - - script: cargo ${{ parameters.cmd }} - displayName: cargo ${{ parameters.cmd }} - - # Run with each specified feature - - ${{ each feature in parameters.features }}: - - script: cargo ${{ parameters.cmd }} --features ${{ feature }} - displayName: cargo ${{ parameters.cmd }} --features ${{ feature }} - - - ${{ if eq(parameters.cmd, 'test') }}: - - script: cargo doc --no-deps - displayName: cargo doc --no-deps - - - ${{ if parameters.benches }}: - - script: cargo check --benches - displayName: Check benchmarks - - # Run with all features - - script: cargo ${{ parameters.cmd }} --all-features - displayName: cargo ${{ parameters.cmd }} --all-features - - # Run with no default features - - script: cargo check --no-default-features - displayName: cargo check --no-default-features diff --git a/ci/azure-tsan.yml b/ci/azure-tsan.yml deleted file mode 100644 index 198b187..0000000 --- a/ci/azure-tsan.yml +++ /dev/null @@ -1,26 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - displayName: TSAN - pool: - vmImage: ubuntu-16.04 - - steps: - - template: azure-install-rust.yml - parameters: - rust_version: ${{ parameters.rust_version }} - - - script: | - set -e - - export RUST_TEST_THREADS=1 - export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0" - export TSAN_OPTIONS="suppressions=`pwd`/ci/tsan" - - # Run address sanitizer - RUSTFLAGS="-Z sanitizer=address" \ - cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut - - # Run thread sanitizer - RUSTFLAGS="-Z sanitizer=thread" \ - cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut - displayName: TSAN / MSAN diff --git a/ci/test-stable.sh b/ci/test-stable.sh new file mode 100644 index 0000000..01a32f5 --- /dev/null +++ b/ci/test-stable.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -ex + +cmd="${1:-test}" + +# Install cargo-hack for feature flag test +cargo install cargo-hack + +# Run with each feature +# * --each-feature includes both default/no-default features +# * --optional-deps is needed for serde feature +cargo hack "${cmd}" --each-feature --optional-deps +# Run with all features +cargo "${cmd}" --all-features + +cargo doc --no-deps --all-features + +if [[ "${RUST_VERSION}" == "nightly"* ]]; then + # Check benchmarks + cargo check --benches + + # Check minimal versions + cargo clean + cargo update -Zminimal-versions + cargo check --all-features +fi diff --git a/ci/tsan.sh b/ci/tsan.sh new file mode 100644 index 0000000..7e5b3be --- /dev/null +++ b/ci/tsan.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +export RUST_TEST_THREADS=1 +export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0" +export TSAN_OPTIONS="suppressions=$(pwd)/ci/tsan" + +# Run address sanitizer +RUSTFLAGS="-Z sanitizer=address" \ +cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut + +# Run thread sanitizer +RUSTFLAGS="-Z sanitizer=thread" \ +cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut |