/
config.yml
61 lines (59 loc) · 1.49 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
restore_registry: &RESTORE_REGISTRY
restore_cache:
key: registry
save_registry: &SAVE_REGISTRY
save_cache:
key: registry-{{ .BuildNum }}
paths:
- /usr/local/cargo/registry/index
deps_key: &DEPS_KEY
key: deps-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }}
restore_deps: &RESTORE_DEPS
restore_cache:
<<: *DEPS_KEY
save_deps: &SAVE_DEPS
save_cache:
<<: *DEPS_KEY
paths:
- target
- /usr/local/cargo/registry/cache
version: 2
jobs:
stable:
docker:
- image: rust:1.32.0-slim
environment:
RUSTFLAGS: -D warnings
steps:
- checkout
- *RESTORE_REGISTRY
- run: cargo generate-lockfile
- *SAVE_REGISTRY
- run: rustc --version | tee ~/rust-version
- *RESTORE_DEPS
- run: cargo test
- run: (cd phf_macros && cargo test)
- run: cargo test -p phf_codegen_test
- run: (cd phf && cargo build --no-default-features)
- *SAVE_DEPS
nightly:
docker:
- image: rustlang/rust:nightly-slim
environment:
RUSTFLAGS: -D warnings
steps:
- checkout
- *RESTORE_REGISTRY
- run: cargo generate-lockfile
- *SAVE_REGISTRY
- run: rustc --version | tee ~/rust-version
- run: cargo test
- run: (cd phf_macros && cargo test && cargo test -- --ignored --test-threads=1)
- run: cargo test -p phf_codegen_test
- run: (cd phf && cargo build --no-default-features)
workflows:
version: 2
test:
jobs:
- stable
- nightly