Skip to content

Commit ce6b36a

Browse files
authored
Add CI (#6)
* Add CI Signed-off-by: Hoverbear <[email protected]> * Fix travis build Signed-off-by: Hoverbear <[email protected]>
1 parent 0785626 commit ce6b36a

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
branches:
2+
only:
3+
# This is where pull requests from "bors r+" are built.
4+
- staging
5+
# This is where pull requests from "bors try" are built.
6+
- trying
7+
# Enable building pull requests.
8+
- master
9+
10+
language: rust
11+
sudo: false
12+
env:
13+
global:
14+
- RUST_BACKTRACE=1
15+
- RUSTFLAGS="-D warnings"
16+
cache: cargo
17+
18+
rust:
19+
20+
matrix:
21+
include:
22+
# This build uses stable and checks rustfmt and clippy.
23+
# We don't check them on nightly since their lints and formatting may differ.
24+
- rust: stable
25+
install:
26+
- rustup component add rustfmt-preview
27+
- rustup component add clippy-preview
28+
before_script:
29+
- cargo fmt --all -- --check
30+
- cargo clippy --all -- -D clippy
31+
# Since many users will use nightlies, also test that.
32+
- rust: nightly
33+
34+
35+
script:
36+
- cargo test --all -- --nocapture
37+
# Validate benches still work.
38+
- cargo bench --all -- --test

appveyor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
branches:
2+
only:
3+
# This is where pull requests from "bors r+" are built.
4+
- staging
5+
# This is where pull requests from "bors try" are built.
6+
- trying
7+
# Enable building pull requests.
8+
- master
9+
10+
environment:
11+
matrix:
12+
- TARGET: x86_64-pc-windows-gnu
13+
RUST_VERSION: stable
14+
- TARGET: x86_64-pc-windows-gnu
15+
RUST_VERSION: nightly
16+
17+
install:
18+
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
19+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
20+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
21+
- rustc -Vv
22+
- cargo -V
23+
24+
# Building is done in the test phase, so we disable Appveyor's build phase.
25+
build: false
26+
27+
cache:
28+
- C:\Users\appveyor\.cargo\registry
29+
- target
30+
31+
test_script:
32+
- cargo test

0 commit comments

Comments
 (0)