1
Fork 0

Build scripts run bin/decode_typed, fix build.

This commit is contained in:
Alex Helfet 2017-12-28 04:05:47 +00:00
parent 9932129199
commit 6a36fe5fd5
3 changed files with 31 additions and 14 deletions

View file

@ -1,20 +1,26 @@
#!/usr/bin/env bash
set -ex
set -ex;
# A simple build script to run locally before pushing.
script_dir=$( cd $(dirname ${BASH_SOURCE[0]}); pwd )
repo_dir=${script_dir}/..
cd ${repo_dir};
for tc in nightly stable beta; do
echo "Toolchain: ${tc}";
rustup toolchain update ${tc};
export CARGO_TARGET_DIR="${repo_dir}/target/build_local/${tc}"
cargo +${tc} test --verbose;
cargo +${tc} test --verbose --no-default-features;
cargo +${tc} test --verbose --no-default-features --features=typed;
cargo +${tc} test --verbose --features=trace;
cargo +${tc} doc --verbose --no-deps;
cargo +${tc} test -p framed --verbose;
cargo +${tc} test -p framed --verbose --no-default-features;
cargo +${tc} test -p framed --verbose --no-default-features --features=typed;
cargo +${tc} test -p framed --verbose --features=trace;
cargo +${tc} doc -p framed --verbose --no-deps;
done
DECODE_TYPE_CRATE_DIR=test_type \
DECODE_TYPE_NAME=framed_test_type::Test \
bin/decode_typed;

View file

@ -23,7 +23,10 @@ export FRAMED_DECODE_DYNAMIC_RS="${TMP_DIR}/dynamic_${DECODE_TYPE_NAME}.rs";
cat > "${FRAMED_DECODE_DYNAMIC_RS}" <<EOF
// Generated by framed-rs/bin/decode_typed, your changes will be overwritten.
extern crate ${TYPE_CRATE_NAME};
use ${DECODE_TYPE_NAME} as UserType;
#[allow(dead_code)]
static USER_TYPE_NAME: &'static str = "${DECODE_TYPE_NAME}";
EOF

View file

@ -1,13 +1,21 @@
#!/usr/bin/env bash
set -e
set -e;
# TODO: Fix me.
script_dir=$( cd $(dirname ${BASH_SOURCE[0]}); pwd )
repo_dir=${script_dir}/../..
echo "TRAVIS_RUST_VERSION: '${TRAVIS_RUST_VERSION}'"
set -x
cargo test --verbose;
cargo test --verbose --no-default-features;
cargo test --verbose --no-default-features --features=typed;
cargo test --verbose --features=trace;
cargo doc --verbose --no-deps;
set -x;
cd ${repo_dir};
cargo test -p framed --verbose;
cargo test -p framed --verbose --no-default-features;
cargo test -p framed --verbose --no-default-features --features=typed;
cargo test -p framed --verbose --features=trace;
cargo doc -p framed --verbose --no-deps;
DECODE_TYPE_CRATE_DIR=test_type \
DECODE_TYPE_NAME=framed_test_type::Test \
bin/decode_typed;