2019-05-02 05:15:16 +00:00
|
|
|
#Adapted from https://users.rust-lang.org/t/my-gitlab-config-docs-tests/16396
|
|
|
|
|
2019-05-06 10:49:25 +00:00
|
|
|
image: 'sigp/lighthouse:latest'
|
2019-05-02 05:15:16 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
2019-05-07 14:52:22 +00:00
|
|
|
- document
|
2019-05-02 05:15:16 +00:00
|
|
|
|
2019-05-07 03:44:35 +00:00
|
|
|
variables:
|
2019-05-07 03:46:02 +00:00
|
|
|
CARGO_HOME: /cache/cargocache
|
2019-06-16 03:29:40 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: normal
|
2019-05-07 03:44:35 +00:00
|
|
|
|
2019-05-06 09:47:41 +00:00
|
|
|
check-fmt:
|
|
|
|
stage: test
|
|
|
|
script:
|
2019-05-07 04:24:46 +00:00
|
|
|
- cargo build --manifest-path protos/Cargo.toml
|
2019-05-06 09:47:41 +00:00
|
|
|
- cargo fmt --all -- --check
|
|
|
|
|
2019-05-06 09:45:30 +00:00
|
|
|
test-dev:
|
2019-05-02 05:15:16 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2019-05-06 09:45:30 +00:00
|
|
|
- cargo test --verbose --all
|
|
|
|
|
|
|
|
test-release:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- cargo test --verbose --all --release
|
|
|
|
|
2019-05-07 14:52:22 +00:00
|
|
|
documentation:
|
|
|
|
stage: document
|
2019-05-02 05:15:16 +00:00
|
|
|
script:
|
|
|
|
- cargo doc --no-deps
|
2019-05-07 15:20:55 +00:00
|
|
|
- aws s3 sync target/doc/ s3://lighthouse-docs.sigmaprime.io/ --exclude '.lock' --delete
|
2019-05-07 14:03:36 +00:00
|
|
|
# Configure the below when we want to have a default page (and update S3 bucket index).
|
|
|
|
# - echo '<meta http-equiv="refresh" content="0; url={{ LIBRARY NAME }}">' > public/index.html
|
2019-05-02 05:15:16 +00:00
|
|
|
only:
|
|
|
|
- master
|