ffsend/.gitlab-ci.yml

63 lines
1.3 KiB
YAML
Raw Normal View History

2018-06-04 23:06:12 +00:00
image: "rust:slim"
stages:
- check
- test
- integration
- release
variables:
RUST_VERSION: stable
# Cargo artifacts caching per Rust version
cache:
key: "$RUST_VERSION"
paths:
2018-06-18 18:31:36 +00:00
- /usr/local/rustup/
- /usr/local/cargo/
2018-06-04 23:06:12 +00:00
- target/
# Install compiler and OpenSSL dependencies
before_script:
- apt-get update -y
- apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev
- rustup install $RUST_VERSION && rustup default $RUST_VERSION
- rustc --version && cargo --version
# Variable defaults
variables:
RUST_VERSION: stable
2018-06-04 23:06:12 +00:00
# Check on stable, beta and nightly
.check-base: &check-base
stage: check
script:
- cargo check --all --verbose
- cargo check --no-default-features --all --verbose
- cargo check --features no-color --all --verbose
2018-06-18 18:31:36 +00:00
rust-stable:
2018-06-04 23:06:12 +00:00
<<: *check-base
2018-06-18 18:31:36 +00:00
rust-beta:
2018-06-04 23:06:12 +00:00
<<: *check-base
variables:
RUST_VERSION: beta
2018-06-18 18:31:36 +00:00
rust-nightly:
2018-06-04 23:06:12 +00:00
<<: *check-base
variables:
RUST_VERSION: nightly
# Run the unit tests through Cargo
2018-06-18 18:31:36 +00:00
cargo-test:
2018-06-04 23:06:12 +00:00
stage: test
script:
- cargo test --all --verbose
# Run integration test with the public Send service
2018-06-18 18:31:36 +00:00
public-send-test:
2018-06-04 23:06:12 +00:00
stage: integration
script:
- cargo build
- head -c 1M </dev/urandom >testfile
- cargo run -- upload testfile -n testfile.bin -a -d 10 -p secret -I
# TODO: download this file, compare checksums