lighthouse/.gitlab-ci.yml

51 lines
1.1 KiB
YAML
Raw Normal View History

#Adapted from https://users.rust-lang.org/t/my-gitlab-config-docs-tests/16396
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 clang libclang-dev cmake build-essential git unzip autoconf libtool
- git clone https://github.com/google/protobuf.git && cd protobuf && ./autogen.sh && ./configure && make && make install && ldconfig && make clean && cd .. && rm -r protobuf
check-fmt:
stage: test
script:
- cargo fmt --all -- --check
test-dev:
stage: test
script:
- cargo test --verbose --all
test-release:
stage: test
script:
- cargo test --verbose --all --release
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/