summaryrefslogtreecommitdiffstats
path: root/third_party/rust/bytes-0.4.12/ci
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/bytes-0.4.12/ci')
-rw-r--r--third_party/rust/bytes-0.4.12/ci/before_deploy.ps123
-rw-r--r--third_party/rust/bytes-0.4.12/ci/before_deploy.sh33
-rw-r--r--third_party/rust/bytes-0.4.12/ci/install.sh31
-rw-r--r--third_party/rust/bytes-0.4.12/ci/script.sh18
-rw-r--r--third_party/rust/bytes-0.4.12/ci/tsan28
5 files changed, 133 insertions, 0 deletions
diff --git a/third_party/rust/bytes-0.4.12/ci/before_deploy.ps1 b/third_party/rust/bytes-0.4.12/ci/before_deploy.ps1
new file mode 100644
index 0000000000..191a30b88d
--- /dev/null
+++ b/third_party/rust/bytes-0.4.12/ci/before_deploy.ps1
@@ -0,0 +1,23 @@
+# This script takes care of packaging the build artifacts that will go in the
+# release zipfile
+
+$SRC_DIR = $PWD.Path
+$STAGE = [System.Guid]::NewGuid().ToString()
+
+Set-Location $ENV:Temp
+New-Item -Type Directory -Name $STAGE
+Set-Location $STAGE
+
+$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
+
+# TODO Update this to package the right artifacts
+Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\hello.exe" '.\'
+
+7z a "$ZIP" *
+
+Push-AppveyorArtifact "$ZIP"
+
+Remove-Item *.* -Force
+Set-Location ..
+Remove-Item $STAGE
+Set-Location $SRC_DIR
diff --git a/third_party/rust/bytes-0.4.12/ci/before_deploy.sh b/third_party/rust/bytes-0.4.12/ci/before_deploy.sh
new file mode 100644
index 0000000000..026dc2898d
--- /dev/null
+++ b/third_party/rust/bytes-0.4.12/ci/before_deploy.sh
@@ -0,0 +1,33 @@
+# This script takes care of building your crate and packaging it for release
+
+set -ex
+
+main() {
+ local src=$(pwd) \
+ stage=
+
+ case $TRAVIS_OS_NAME in
+ linux)
+ stage=$(mktemp -d)
+ ;;
+ osx)
+ stage=$(mktemp -d -t tmp)
+ ;;
+ esac
+
+ test -f Cargo.lock || cargo generate-lockfile
+
+ # TODO Update this to build the artifacts that matter to you
+ cross rustc --bin hello --target $TARGET --release -- -C lto
+
+ # TODO Update this to package the right artifacts
+ cp target/$TARGET/release/hello $stage/
+
+ cd $stage
+ tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
+ cd $src
+
+ rm -rf $stage
+}
+
+main
diff --git a/third_party/rust/bytes-0.4.12/ci/install.sh b/third_party/rust/bytes-0.4.12/ci/install.sh
new file mode 100644
index 0000000000..76bb7340d8
--- /dev/null
+++ b/third_party/rust/bytes-0.4.12/ci/install.sh
@@ -0,0 +1,31 @@
+set -ex
+
+main() {
+ curl https://sh.rustup.rs -sSf | \
+ sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
+
+ local target=
+ if [ $TRAVIS_OS_NAME = linux ]; then
+ target=x86_64-unknown-linux-gnu
+ sort=sort
+ else
+ target=x86_64-apple-darwin
+ sort=gsort # for `sort --sort-version`, from brew's coreutils.
+ fi
+
+ # This fetches latest stable release
+ local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
+ | cut -d/ -f3 \
+ | grep -E '^v[0-9.]+$' \
+ | $sort --version-sort \
+ | tail -n1)
+ echo cross version: $tag
+ curl -LSfs https://japaric.github.io/trust/install.sh | \
+ sh -s -- \
+ --force \
+ --git japaric/cross \
+ --tag $tag \
+ --target $target
+}
+
+main
diff --git a/third_party/rust/bytes-0.4.12/ci/script.sh b/third_party/rust/bytes-0.4.12/ci/script.sh
new file mode 100644
index 0000000000..d1ed7f9242
--- /dev/null
+++ b/third_party/rust/bytes-0.4.12/ci/script.sh
@@ -0,0 +1,18 @@
+# This script takes care of testing your crate
+
+set -ex
+
+main() {
+ cross build --target $TARGET $EXTRA_ARGS
+
+ if [ ! -z $DISABLE_TESTS ]; then
+ return
+ fi
+
+ cross test --target $TARGET $EXTRA_ARGS
+}
+
+# we don't run the "test phase" when doing deploys
+if [ -z $TRAVIS_TAG ]; then
+ main
+fi
diff --git a/third_party/rust/bytes-0.4.12/ci/tsan b/third_party/rust/bytes-0.4.12/ci/tsan
new file mode 100644
index 0000000000..9cc54841bf
--- /dev/null
+++ b/third_party/rust/bytes-0.4.12/ci/tsan
@@ -0,0 +1,28 @@
+# TSAN suppressions file for `bytes`
+
+# TSAN does not understand fences and `Arc::drop` is implemented using a fence.
+# This causes many false positives.
+race:Arc*drop
+race:arc*Weak*drop
+
+# `std` mpsc is not used in any Bytes code base. This race is triggered by some
+# rust runtime logic.
+race:std*mpsc_queue
+
+# Some test runtime races. Allocation should be race free
+race:alloc::alloc
+
+# Not sure why this is warning, but it is in the test harness and not the library.
+race:TestEvent*clone
+race:test::run_tests_console::*closure
+
+# Probably more fences in std.
+race:__call_tls_dtors
+
+# `is_inline_or_static` is explicitly called concurrently without synchronization.
+# The safety explanation can be found in a comment.
+race:Inner::is_inline_or_static
+
+# This ignores a false positive caused by `thread::park()`/`thread::unpark()`.
+# See: https://github.com/rust-lang/rust/pull/54806#issuecomment-436193353
+race:pthread_cond_destroy