diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1a1c9799..90097a763 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,11 +2,14 @@ stages: - test - build - publish + - publish-onchain - optional -image: parity/rust:gitlab-ci +image: parity/rust-parity-ethereum-build:stretch variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: recursive CI_SERVER_NAME: "GitLab CI" CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" CARGO_TARGET: x86_64-unknown-linux-gnu @@ -40,25 +43,28 @@ test-linux: variables: RUN_TESTS: all script: - - scripts/gitlab/test-all.sh stable + - scripts/gitlab/test-all.sh tags: - - rust-stable + - linux-docker test-audit: stage: test script: - - scripts/gitlab/cargo-audit.sh + - set -e + - set -u + - cargo audit tags: - - rust-stable + - linux-docker build-linux: stage: build only: *releaseable_branches script: - scripts/gitlab/build-unix.sh + - sccache -s <<: *collect_artifacts tags: - - rust-stable + - linux-docker build-darwin: stage: build @@ -112,19 +118,66 @@ publish-snap: allow_failure: true <<: *collect_artifacts -publish-awss3: - stage: publish +publish:onnet:update: + stage: publish-onchain only: *releaseable_branches - cache: {} + cache: {} dependencies: - build-linux - build-darwin - build-windows + - publish:awss3:release before_script: *determine_version script: - - scripts/gitlab/publish-awss3.sh + - scripts/gitlab/publish-onnet-update.sh tags: - - shell + - linux-docker + +# configures aws for fast uploads/syncs +.s3_before_script: &s3_before_script + before_script: + - mkdir -p ${HOME}/.aws + - | + cat > ${HOME}/.aws/config < $binary.sha3 fi done - diff --git a/scripts/gitlab/cargo-audit.sh b/scripts/gitlab/cargo-audit.sh deleted file mode 100755 index 16f0dc934..000000000 --- a/scripts/gitlab/cargo-audit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error - -cargo install cargo-audit -cargo audit diff --git a/scripts/gitlab/publish-awss3.sh b/scripts/gitlab/publish-onnet-update.sh similarity index 73% rename from scripts/gitlab/publish-awss3.sh rename to scripts/gitlab/publish-onnet-update.sh index af768a632..588cbdfb5 100755 --- a/scripts/gitlab/publish-awss3.sh +++ b/scripts/gitlab/publish-onnet-update.sh @@ -36,19 +36,3 @@ do esac cd .. done - -echo "__________Push binaries to AWS S3____________" -aws configure set aws_access_key_id $s3_key -aws configure set aws_secret_access_key $s3_secret - -case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in - (beta|stable|nightly) - export S3_BUCKET=releases.parity.io/ethereum; - ;; - (*) - export S3_BUCKET=builds-parity; - ;; -esac - -aws s3 sync ./ s3://$S3_BUCKET/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/ - diff --git a/scripts/gitlab/test-all.sh b/scripts/gitlab/test-all.sh index 15c228706..925124b7a 100755 --- a/scripts/gitlab/test-all.sh +++ b/scripts/gitlab/test-all.sh @@ -1,6 +1,4 @@ #!/bin/bash -# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly) - set -e # fail on any error set -u # treat unset variables as error @@ -27,9 +25,6 @@ then exit 0 fi -rustup default $1 - -git submodule update --init --recursive rustup show exec ./test.sh diff --git a/test.sh b/test.sh index 1b05194e4..a25f41d9a 100755 --- a/test.sh +++ b/test.sh @@ -1,33 +1,12 @@ #!/bin/sh # Running Parity Full Test Suite +echo "________Running test.sh________" FEATURES="json-tests,ci-skip-issue" OPTIONS="--release" VALIDATE=1 THREADS=8 -case $1 in - --no-json) - FEATURES="ipc" - shift # past argument=value - ;; - --no-release) - OPTIONS="" - shift - ;; - --no-validate) - VALIDATE=0 - shift - ;; - --no-run) - OPTIONS="--no-run" - shift - ;; - *) - # unknown option - ;; -esac - set -e