commit
19f89f7281
15
.travis.yml
15
.travis.yml
|
@ -1,10 +1,11 @@
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: XR0z4IBBGJP6jB0CalptPbGOhAd4HvZb5l35/SPec5sAF+9Z4tQHa7nkg9TkJd6Yf6AVyfDKCA/knVrTzrf883UfWUXMLtr1/Y5kSqEJ+bSGapRAjECHS0+Ts56N6Rqrs8mhXDtl21PtUQnvQDTedm/85VXbHqnX9kgCqVQMtCs=
|
|
||||||
|
|
||||||
language: rust
|
language: rust
|
||||||
|
sudo: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- rust: stable
|
||||||
|
- rust: beta
|
||||||
|
- rust: nightly
|
||||||
|
|
||||||
after_script:
|
after_success:
|
||||||
- cargo doc
|
- cargo doc
|
||||||
- mv target/doc doc
|
- curl https://raw.githubusercontent.com/kmcallister/travis-doc-upload/master/travis-doc-upload.sh | sh
|
||||||
- curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh
|
|
||||||
|
|
|
@ -12,5 +12,8 @@ documentation = "http://www.rust-ci.org/kennytm/qrcode-rust/doc/qrcode/index.htm
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num = "*"
|
num = "*"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
bench = []
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "qrencode"
|
name = "qrencode"
|
||||||
|
|
BIN
scripts/id_rsa.enc
Normal file
BIN
scripts/id_rsa.enc
Normal file
Binary file not shown.
3
scripts/travis-doc-upload.cfg
Normal file
3
scripts/travis-doc-upload.cfg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
PROJECT_NAME=qrcode-rust
|
||||||
|
DOCS_REPO=kennytm/qrcode-rust.git
|
||||||
|
SSH_KEY_TRAVIS_ID=cbc3a9ac2cf3
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use std::cmp::min;
|
use std::cmp::min;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(feature="bench")]
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
||||||
use types::{QrResult, QrError, Mode, EcLevel, Version};
|
use types::{QrResult, QrError, Mode, EcLevel, Version};
|
||||||
|
@ -122,6 +122,7 @@ fn test_push_number() {
|
||||||
0b1__0000000]); // 128
|
0b1__0000000]); // 128
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature="bench")]
|
||||||
#[bench]
|
#[bench]
|
||||||
fn bench_push_splitted_bytes(bencher: &mut Bencher) {
|
fn bench_push_splitted_bytes(bencher: &mut Bencher) {
|
||||||
bencher.iter(|| {
|
bencher.iter(|| {
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
|
|
||||||
#![cfg_attr(test, feature(test))] // Unstable libraries
|
#![cfg_attr(feature="bench", feature(test))] // Unstable libraries
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(feature="bench")]
|
||||||
extern crate test;
|
extern crate test;
|
||||||
extern crate num;
|
extern crate num;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
use std::slice::Iter;
|
use std::slice::Iter;
|
||||||
use types::{Mode, Version};
|
use types::{Mode, Version};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(feature="bench")]
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -451,6 +451,7 @@ mod optimize_tests {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature="bench")]
|
||||||
#[bench]
|
#[bench]
|
||||||
fn bench_optimize(bencher: &mut Bencher) {
|
fn bench_optimize(bencher: &mut Bencher) {
|
||||||
use types::Version;
|
use types::Version;
|
||||||
|
|
Loading…
Reference in a new issue