Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #531 from stegos/ec-issue-520-release-ci
Browse files Browse the repository at this point in the history
Added manual `release` stage to build release binaries for Linux and macOS
  • Loading branch information
rtsisyk committed Feb 22, 2019
2 parents 5e5ba75 + b0da58b commit b59fd32
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ stages:

before_script:
- ci-scripts/install-deps.sh
- rustup component add rustfmt
- cargo install cargo-audit

# Running fast-checks to notice an author that his pull-request fails our standatds.
# This checks should not produce any artifacts
fast_checks:
stage: fast_checks
script:
- rustup component add rustfmt
- cargo install cargo-audit
- cargo audit
- cargo fmt --all -- --check
tags:
Expand Down Expand Up @@ -46,7 +46,7 @@ build:macos:
.test:
stage: test
script:
- RUST_MIN_STACK=8388608 cargo test --all -- --nocapture
- cargo test --all -- --nocapture
artifacts:
expire_in: 1 week
paths:
Expand All @@ -70,6 +70,7 @@ test:macos:
code_coverage:
stage: code_coverage
image: rust:1.32
before_script:
script:
- ci-scripts/coverage.sh
dependencies:
Expand All @@ -82,24 +83,30 @@ code_coverage:

.release:
stage: release
script:
- cargo build --release
only:
- dev
- master
when: manual
dependencies: []
artifacts:
expire_in: 1 week
paths:
- target/
- release/

release:linux:
extends: .release
image: rust:1.32
script:
- cargo install --path . --root /usr/local && strip /usr/local/bin/stegos
- mkdir -p release/linux && mv /usr/local/bin/stegos release/linux
tags:
- linux

release:macos:
extends: .release
script:
- sudo cargo install --path . --root /usr/local && sudo strip /usr/local/bin/stegos
- mkdir -p release/macos && mv /usr/local/bin/stegos release/macos
tags:
- macos

0 comments on commit b59fd32

Please sign in to comment.