.gitlab-ci.yml 1.31 KB
Newer Older
Fuzen's avatar
Fuzen committed
1 2 3
stages:
- build
- test
Fuzen's avatar
Fuzen committed
4
- sanitary
Fuzen's avatar
Fuzen committed
5 6 7

image:
  name: rust:latest
Fuzen's avatar
Fuzen committed
8 9 10 11

build:
  stage: build
  script:
Fuzen's avatar
Fuzen committed
12 13
    - rustc --version
    - cargo --version
14
    - cargo update
Fuzen's avatar
Fuzen committed
15
    - cargo build
16 17 18 19
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
      - target/
Fuzen's avatar
Fuzen committed
20 21 22 23

test:
  stage: test
  script:
Fuzen's avatar
Fuzen committed
24 25 26
    - rustc --version
    - cargo --version
    - cargo test
27 28 29 30 31
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
      - target/
    policy: pull
32

Fuzen's avatar
Fuzen committed
33
bench-test:
Fuzen's avatar
Fuzen committed
34
  stage: test
Fuzen's avatar
Fuzen committed
35 36 37
  script:
    - rustc --version
    - cargo --version
38 39 40 41
    - cargo bench -- --test
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
42
      - target/
Fuzen's avatar
Fuzen committed
43

Fuzen's avatar
Fuzen committed
44
build-small_rng:
Fuzen's avatar
Fuzen committed
45
  stage: build
Fuzen's avatar
Fuzen committed
46 47 48 49
  script:
    - rustc --version
    - cargo --version
    - cargo update
Fuzen's avatar
Fuzen committed
50
    - cargo build --features="small_rng"
Fuzen's avatar
Fuzen committed
51 52 53 54 55
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
      - target/

Fuzen's avatar
Fuzen committed
56
test-small_rng:
Fuzen's avatar
Fuzen committed
57
  stage: test
Fuzen's avatar
Fuzen committed
58 59 60
  script:
    - rustc --version
    - cargo --version
Fuzen's avatar
Fuzen committed
61
    - cargo test --features="small_rng"
Fuzen's avatar
Fuzen committed
62 63 64 65 66 67
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
      - target/
    policy: pull

Fuzen's avatar
Fuzen committed
68
bench-test-small_rng:
Fuzen's avatar
Fuzen committed
69
  stage: test
Fuzen's avatar
Fuzen committed
70 71 72
  script:
    - rustc --version
    - cargo --version
Fuzen's avatar
Fuzen committed
73
    - cargo bench --features="small_rng" -- --test
Fuzen's avatar
Fuzen committed
74 75 76 77
  cache:
    key: "$CI_COMMIT_REF_SLUG"
    paths:
      - target/
Fuzen's avatar
Fuzen committed
78 79 80 81 82 83

sanitary:
  stage: sanitary
  script:
    - '! grep -wr "unimplemented!()" src/'
    - '! grep -wr "panic!" src/'