.gitlab-ci.yml 1.22 KB
Newer Older
SamwiseFilmore's avatar
SamwiseFilmore committed
1 2 3 4 5 6
image: "rust:latest"

stages:
  - build
  - test

Michael Aaron Murphy's avatar
Michael Aaron Murphy committed
7
before_script:
SamwiseFilmore's avatar
SamwiseFilmore committed
8 9 10 11 12
    - rustup toolchain add $toolchain

cache:
  paths:
    - target/
Michael Aaron Murphy's avatar
Michael Aaron Murphy committed
13

SamwiseFilmore's avatar
SamwiseFilmore committed
14 15 16 17
build:stable:
  stage: build
  variables:
    toolchain: stable
Michael Aaron Murphy's avatar
Michael Aaron Murphy committed
18
  script:
19
    - cargo +stable build --verbose
SamwiseFilmore's avatar
SamwiseFilmore committed
20 21 22 23 24 25 26 27 28
    - cargo +stable build --release --verbose

test:stable:
  stage: test
  variables:
    toolchain: stable
  dependencies:
    - build:stable
  script:
29 30
    - script -q -c "cargo +stable test --verbose"
    - script -q -c "cargo +stable test --release --verbose"
Michael Aaron Murphy's avatar
Michael Aaron Murphy committed
31

SamwiseFilmore's avatar
SamwiseFilmore committed
32 33 34 35
build:beta:
  stage: build
  variables:
    toolchain: beta
36 37
  script:
    - cargo +beta build --verbose
SamwiseFilmore's avatar
SamwiseFilmore committed
38 39 40 41 42 43 44 45 46
    - cargo +beta build --release --verbose

test:beta:
  stage: test
  variables:
    toolchain: beta
  dependencies:
    - build:beta
  script:
47 48
    - script -q -c "cargo +beta test --verbose"
    - script -q -c "cargo +beta test --release --verbose"
49

SamwiseFilmore's avatar
SamwiseFilmore committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63
build:nightly:
  stage: build
  variables:
    toolchain: nightly
  script:
    - cargo +nightly build --verbose
    - cargo +nightly build --release --verbose

test:nightly:
  stage: test
  variables:
    toolchain: nightly
  dependencies:
    - build:nightly
64
  script:
SamwiseFilmore's avatar
SamwiseFilmore committed
65 66
    - script -q -c "cargo +nightly test --verbose"
    - script -q -c "cargo +nightly test --release --verbose"