nodespeak 0.0.4

A JIT-ish compiler for number-crunching applications.
Documentation
image: alpine

stages:
  - check
  - build
  - document
  - check_artifacts
  - publish
  - pages

check:
  stage: check
  image: rust:latest
  script: 
    - apt update
    - apt -y install llvm-7
    - export LLVM_SYS_70_PREFIX=/usr/bin/llvm-7/
    - cargo test
  only: 
    - master
    - merge_requests
  
build:
  stage: build 
  image: rust:latest
  script: 
    - apt update
    - apt -y install llvm-7
    - export LLVM_SYS_70_PREFIX=/usr/bin/llvm-7/
    - cargo build --release
  only: 
  - master
  - merge_requests
  artifacts:
    paths: 
    - target/release/nodespeak
    expire_in: 30 minutes
  
document:
  stage: document
  image: rustlang/rust:nightly
  script: 
    - apt update
    - apt -y install llvm-7
    - export LLVM_SYS_70_PREFIX=/usr/bin/llvm-7/
    - cargo doc
  only: 
  - master
  - merge_requests
  artifacts:
    paths:
    - target/doc
    expire_in: 30 minutes

check_artifacts:
  stage: check_artifacts
  dependencies: 
  - build
  - document
  script: 
  - test -e target/release/nodespeak
  - test -e target/doc
  only:
  - merge_requests

publish:
  stage: publish
  dependencies: 
  - build
  - document
  script: 
  - mv target/release/nodespeak nodespeak
  - mv target/doc pages
  only: 
  - master
  artifacts:
    paths:
    - nodespeak
    - pages

pages:
  stage: pages 
  dependencies:
  - publish
  script:
  - mv pages public
  only: 
  - master
  artifacts:
    paths:
    - public