Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge upstream #66

Merged
merged 10 commits into from
Mar 15, 2019
85 changes: 65 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ variables:
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
CARGO_TARGET: x86_64-unknown-linux-gnu

.no_git: &no_git #disable git strategy
variables:
GIT_STRATEGY: none
GIT_SUBMODULE_STRATEGY: none

.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches
Expand All @@ -20,7 +24,6 @@ variables:
- tags
- schedules


.collect_artifacts: &collect_artifacts
artifacts:
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
Expand All @@ -29,34 +32,66 @@ variables:
paths:
- artifacts/

test-linux:
stage: test
variables:
RUN_TESTS: all
script:
- scripts/gitlab/test-all.sh
.docker-cache-status: &docker-cache-status
dependencies: []
before_script:
- sccache -s
after_script:
- sccache -s
tags:
- linux-docker

test-audit:

cargo-check 0 3:
stage: test
<<: *docker-cache-status
script:
- time cargo check --target $CARGO_TARGET --locked --no-default-features

cargo-check 1 3:
stage: test
<<: *docker-cache-status
script:
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features

cargo-check 2 3:
stage: test
<<: *docker-cache-status
script:
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"

cargo-audit:
stage: test
script:
- set -e
- set -u
- cargo audit
tags:
- linux-docker

validate-chainspecs:
stage: test
<<: *docker-cache-status
script:
- ./scripts/gitlab/validate-chainspecs.sh

test-cpp:
stage: build
<<: *docker-cache-status
script:
- ./scripts/gitlab/test-cpp.sh

test-linux:
stage: build
<<: *docker-cache-status
script:
- ./scripts/gitlab/test-linux.sh

build-linux: &build-linux
stage: build
only: *releaseable_branches
<<: *docker-cache-status
script:
- scripts/gitlab/build-unix.sh
- sccache -s
- scripts/gitlab/build-linux.sh
<<: *collect_artifacts
tags:
- linux-docker

build-linux-i386:
<<: *build-linux
Expand Down Expand Up @@ -84,7 +119,7 @@ build-darwin:
CC: gcc
CXX: g++
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- rust-osx
<<: *collect_artifacts
Expand Down Expand Up @@ -164,13 +199,25 @@ publish-awss3-release:
image: parity/awscli:latest
stage: publish
only: *releaseable_branches
<<: *no_git
cache: {}
dependencies:
- build-linux
- build-darwin
- build-windows
script:
- scripts/gitlab/publish-aws.sh
- echo "__________Push binaries to AWS S3____________"
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
(beta|stable|nightly)
export BUCKET=releases.parity.io/ethereum;
;;
(*)
export BUCKET=builds-parity;
;;
esac
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
- echo "__________Read from S3____________"
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
tags:
- linux-docker

Expand All @@ -187,14 +234,12 @@ publish-docs:
- linux-docker

build-android:
stage: optional
stage: build
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
dependencies: []
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- linux-docker
allow_failure: true
<<: *collect_artifacts
Loading