Skip to content

Instantly share code, notes, and snippets.

@karuna
Created January 6, 2019 15:27
Show Gist options
  • Save karuna/160b5c8f0edabcd740c31ab8de9eb5e2 to your computer and use it in GitHub Desktop.
Save karuna/160b5c8f0edabcd740c31ab8de9eb5e2 to your computer and use it in GitHub Desktop.

Revisions

  1. karuna created this gist Jan 6, 2019.
    39 changes: 39 additions & 0 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    image: 'rust:latest'

    stages:
    - test
    - doc
    - build

    variables:
    CARGO_HOME: $CI_PROJECT_DIR/cargo
    APT_CACHE_DIR: $CI_PROJECT_DIR/apt

    before_script:
    - apt-get update -yq
    - apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y {{ DEPENDENCIES }}

    test:
    stage: test
    script:
    - rustc --version
    - cargo --version
    - cargo test --verbose

    pages:
    stage: doc
    script:
    - cargo doc --no-deps
    - mv target/doc public
    - echo '<meta http-equiv="refresh" content="0; url={{ LIBRARY NAME }}">' > public/index.html
    artifacts:
    paths:
    - public
    only:
    - master

    cache:
    paths:
    - apt/
    - cargo/
    - target/