Skip to content

Commit

Permalink
Merge branch 'gitlab-ci' into 'master'
Browse files Browse the repository at this point in the history
Add GitLab CI configuration

See merge request timvisee/ffsend-api!3
  • Loading branch information
timvisee committed Oct 17, 2018
2 parents ab76ae4 + 35b2b00 commit 73f3cd3
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
image: "rust:slim"

stages:
- check
- build
- test
- release

variables:
RUST_VERSION: stable

# Cargo artifacts caching per Rust version and pipeline
cache:
key: "$RUST_VERSION"
paths:
- /usr/local/rustup/
- /usr/local/cargo/
- target/

# Install compiler and OpenSSL dependencies
before_script:
- apt-get update
- 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

# Check on stable, beta and nightly
.check-base: &check-base
stage: check
script:
- cargo check --verbose
rust-stable:
<<: *check-base
rust-beta:
<<: *check-base
variables:
RUST_VERSION: beta
cache: {}
rust-nightly:
<<: *check-base
variables:
RUST_VERSION: nightly
cache: {}

# Run the unit tests through Cargo
cargo-test:
stage: test
dependencies: []
script:
- cargo test --verbose

# Cargo crate release
crate:
stage: release
only:
- "/^v([0-9]+\\.)*[0-9]+.*$/"
script:
- echo "Creating release crate on crates.io..."
- echo $CARGO_TOKEN | cargo login
- cargo publish --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This repository is still being worked on,
and this documentation is not finished yet.

Here is a demo of the API implementation as used in [ffsend][ffsend]:
[![ffsend-api implementation demo from ffsend][ffsend-usage-demo-svg]][ffsend-usage-demo-asciinema]
[![ffsend-api implementation demo from ffsend][ffsend-usage-demo-svg]][ffsend-usage-demo-asciinema]
_Implementation demo from [ffsend][ffsend] not visible here?
View it on [asciinema][ffsend-usage-demo-asciinema]._

Expand Down

0 comments on commit 73f3cd3

Please sign in to comment.