Updating the CI system with the publication of releases and binary files on github
Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>
This commit is contained in:
parent
79eb8f7ace
commit
ebc6b9cec9
545
.gitlab-ci.yml
545
.gitlab-ci.yml
@ -1,263 +1,364 @@
|
|||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- push-release
|
|
||||||
- build
|
- build
|
||||||
|
- package
|
||||||
|
- publish
|
||||||
|
- push-release
|
||||||
|
|
||||||
|
image: parity/rust:gitlab-ci
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
RUST_BACKTRACE: "1"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
RUSTFLAGS: ""
|
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
|
||||||
CARGOFLAGS: ""
|
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
BUILD_TARGET: ubuntu
|
||||||
LIBSSL: "libssl1.0.0 (>=1.0.0)"
|
BUILD_ARCH: amd64
|
||||||
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
|
LIBSSL: "libssl1.0.0 (>=1.0.0)"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: "$CI_BUILD_STAGE-$CI_BUILD_REF_NAME"
|
key: "${CI_JOB_NAME}"
|
||||||
paths:
|
paths:
|
||||||
- target/
|
- ${CI_PROJECT_DIR}/target/
|
||||||
untracked: true
|
- ${CI_PROJECT_DIR}/cargo/
|
||||||
linux-ubuntu:
|
|
||||||
stage: build
|
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
||||||
image: parity/rust:gitlab-ci
|
only: &releaseable_branches
|
||||||
only:
|
- master
|
||||||
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- tags
|
- tags
|
||||||
- stable
|
- nightly
|
||||||
- triggers
|
- triggers
|
||||||
|
|
||||||
|
.publishable_branches: # list of git refs for publishing builds to the "production" locations
|
||||||
|
only: &publishable_branches
|
||||||
|
- nightly # Our nightly builds from schedule, on `master`
|
||||||
|
- "v*" # Our version tags
|
||||||
|
- triggers
|
||||||
|
|
||||||
|
.collect_artifacts: &collect_artifacts
|
||||||
|
artifacts:
|
||||||
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||||
|
when: on_success
|
||||||
|
expire_in: 1 mos
|
||||||
|
paths:
|
||||||
|
- artifacts/
|
||||||
|
|
||||||
|
.collect_packages: &collect_packages
|
||||||
|
artifacts:
|
||||||
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||||
|
when: on_success
|
||||||
|
expire_in: 1 mos
|
||||||
|
paths:
|
||||||
|
- packages/
|
||||||
|
|
||||||
|
.determine_version: &determine_version |
|
||||||
|
export VERSION=$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
|
||||||
|
echo "Version" $VERSION
|
||||||
|
|
||||||
|
|
||||||
|
#### stage: test
|
||||||
|
|
||||||
|
test:rust:stable: &test
|
||||||
|
stage: test
|
||||||
script:
|
script:
|
||||||
- rustup default stable
|
- scripts/gitlab/test.sh stable
|
||||||
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
|
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ ubuntu
|
|
||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
artifacts:
|
|
||||||
paths:
|
.optional_test: &optional_test
|
||||||
- parity.zip
|
<<: *test
|
||||||
name: "stable-x86_64-unknown-linux-gnu_parity"
|
allow_failure: true
|
||||||
linux-debian:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-debian:gitlab-ci
|
|
||||||
only:
|
only:
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
- triggers
|
||||||
|
- master
|
||||||
|
- nightly
|
||||||
|
|
||||||
|
test:rust:beta:
|
||||||
|
<<: *optional_test
|
||||||
script:
|
script:
|
||||||
- export LIBSSL="libssl1.1 (>=1.1.0)"
|
- scripts/gitlab/test.sh beta
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++ debian
|
allow_failure: true
|
||||||
|
|
||||||
|
test:rust:nightly:
|
||||||
|
<<: *optional_test
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/test.sh nightly
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
#test:rustfmt:
|
||||||
|
# <<: *optional_test
|
||||||
|
# script:
|
||||||
|
# - scripts/gitlab/rustfmt.sh
|
||||||
|
|
||||||
|
#test:clippy:
|
||||||
|
# <<: *optional_test
|
||||||
|
# script:
|
||||||
|
# - scripts/gitlab/clippy.sh
|
||||||
|
|
||||||
|
test:coverage:
|
||||||
|
stage: test
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- gitlab-next
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/coverage.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-debian
|
- shell
|
||||||
artifacts:
|
allow_failure: true
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "stable-x86_64-unknown-debian-gnu_parity"
|
#### stage: build
|
||||||
linux-centos:
|
|
||||||
stage: build
|
build:linux:ubuntu:amd64: &build
|
||||||
image: parity/rust-centos:gitlab-ci
|
stage: build
|
||||||
only:
|
only: *releaseable_branches
|
||||||
- beta
|
variables:
|
||||||
- tags
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ centos
|
- scripts/gitlab/build-unix.sh
|
||||||
tags:
|
<<: *collect_artifacts
|
||||||
- rust-centos
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "x86_64-unknown-centos-gnu_parity"
|
|
||||||
linux-i686:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-i686:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ ubuntu
|
|
||||||
tags:
|
|
||||||
- rust-i686
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "i686-unknown-linux-gnu"
|
|
||||||
allow_failure: true
|
|
||||||
linux-armv7:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-armv7:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "armv7_unknown_linux_gnueabihf_parity"
|
|
||||||
allow_failure: true
|
|
||||||
linux-arm:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-arm:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "arm-unknown-linux-gnueabihf_parity"
|
|
||||||
allow_failure: true
|
|
||||||
linux-aarch64:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-arm64:gitlab-ci
|
|
||||||
only:
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ ubuntu
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "aarch64-unknown-linux-gnu_parity"
|
|
||||||
linux-snap:
|
|
||||||
stage: build
|
|
||||||
image: parity/snapcraft:gitlab-ci
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ snap
|
|
||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
artifacts:
|
|
||||||
paths:
|
build:linux:debian:amd64:
|
||||||
- parity.zip
|
<<: *build
|
||||||
name: "stable-x86_64-unknown-snap-gnu_parity"
|
image: parity/rust-debian:gitlab-ci
|
||||||
darwin:
|
variables:
|
||||||
stage: build
|
LIBSSL: "libssl1.1 (>=1.1.0)"
|
||||||
only:
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
- beta
|
|
||||||
- tags
|
build:linux:centos:x86_64:
|
||||||
- stable
|
<<: *build
|
||||||
- triggers
|
image: parity/rust-centos:gitlab-ci
|
||||||
script:
|
retry: 2 #if version `GLIBC_2.18' not found
|
||||||
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ macos
|
|
||||||
|
build:linux:ubuntu:arm64:
|
||||||
|
<<: *build
|
||||||
|
image: parity/rust-arm64:gitlab-ci
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
|
build:linux:ubuntu:armhf:
|
||||||
|
<<: *build
|
||||||
|
image: parity/rust-armv7:gitlab-ci
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
||||||
|
|
||||||
|
build:linux:android:armhf:
|
||||||
|
<<: *build
|
||||||
|
image: parity/rust-android:gitlab-ci
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
|
|
||||||
|
build:macos:x86_64:
|
||||||
|
<<: *build
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
tags:
|
tags:
|
||||||
- osx
|
- osx
|
||||||
artifacts:
|
<<: *collect_artifacts
|
||||||
paths:
|
|
||||||
- parity.zip
|
build-windows-x86_64:
|
||||||
name: "x86_64-apple-darwin_parity"
|
stage: build
|
||||||
windows:
|
only: *releaseable_branches
|
||||||
cache:
|
cache:
|
||||||
key: "%CI_BUILD_STAGE%-%CI_BUILD_REF_NAME%"
|
key: "%CI_JOB_NAME%"
|
||||||
untracked: true
|
paths:
|
||||||
stage: build
|
- "%CI_PROJECT_DIR%/target/"
|
||||||
only:
|
- "%CI_PROJECT_DIR%/cargo/"
|
||||||
- beta
|
variables:
|
||||||
- tags
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
script:
|
||||||
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" windows
|
- sh scripts/gitlab/build-windows.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-windows
|
- rust-windows
|
||||||
artifacts:
|
<<: *collect_artifacts
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "x86_64-pc-windows-msvc_parity"
|
#### stage: package
|
||||||
android-armv7:
|
|
||||||
stage: build
|
package:ubuntu:deb:amd64: &package_unix
|
||||||
image: parity/parity-android:latest
|
stage: package
|
||||||
only:
|
only: *releaseable_branches
|
||||||
- beta
|
|
||||||
- tags
|
|
||||||
- stable
|
|
||||||
- triggers
|
|
||||||
script:
|
|
||||||
- cargo build --target=armv7-linux-androideabi
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- parity.zip
|
|
||||||
name: "armv7-linux-androideabi_parity"
|
|
||||||
docker-build:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
- triggers
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker info
|
- *determine_version
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: amd64
|
||||||
|
IDENT: ubuntu
|
||||||
|
PKG: deb
|
||||||
|
LIBSSL: "libssl1.1 (>=1.1.0)"
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:amd64
|
||||||
script:
|
script:
|
||||||
- if [ "$CI_BUILD_REF_NAME" == "master" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
|
- scripts/gitlab/package-unix.sh
|
||||||
- echo "Tag:" $DOCKER_TAG
|
|
||||||
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
|
||||||
- scripts/docker-build.sh $DOCKER_TAG
|
|
||||||
- docker logout
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
test-coverage:
|
|
||||||
stage: test
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-test.sh test-coverage
|
|
||||||
tags:
|
|
||||||
- kcov
|
|
||||||
allow_failure: true
|
|
||||||
test-rust-stable:
|
|
||||||
stage: test
|
|
||||||
image: parity/rust:gitlab-ci
|
|
||||||
script:
|
|
||||||
- scripts/gitlab-test.sh stable
|
|
||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
test-rust-beta:
|
<<: *collect_packages
|
||||||
stage: test
|
|
||||||
only:
|
package:ubuntu:deb:arm64:
|
||||||
- triggers
|
<<: *package_unix
|
||||||
- master
|
variables:
|
||||||
image: parity/rust:gitlab-ci
|
BUILD_ARCH: arm64
|
||||||
|
IDENT: ubuntu
|
||||||
|
PKG: deb
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:arm64
|
||||||
|
|
||||||
|
package:ubuntu:deb:armhf:
|
||||||
|
<<: *package_unix
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: armhf
|
||||||
|
IDENT: ubuntu
|
||||||
|
PKG: deb
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:armhf
|
||||||
|
|
||||||
|
package:debian:deb:amd64:
|
||||||
|
<<: *package_unix
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: amd64
|
||||||
|
IDENT: debian
|
||||||
|
PKG: deb
|
||||||
|
dependencies:
|
||||||
|
- build:linux:debian:amd64
|
||||||
|
|
||||||
|
package:centos:rpm:x86_64:
|
||||||
|
<<: *package_unix
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: x86_64
|
||||||
|
IDENT: centos
|
||||||
|
PKG: rpm
|
||||||
|
LIBSSL: "libssl >= 1.0.0"
|
||||||
|
dependencies:
|
||||||
|
- build:linux:centos:x86_64
|
||||||
|
|
||||||
|
|
||||||
|
package:macos:pkg:x86_64:
|
||||||
|
<<: *package_unix
|
||||||
|
dependencies:
|
||||||
|
- build:macos:x86_64
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh beta
|
- scripts/gitlab/package-macos.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-beta
|
- osx
|
||||||
allow_failure: true
|
|
||||||
test-rust-nightly:
|
package:linux:snap:amd64: &package_snap
|
||||||
stage: test
|
stage: package
|
||||||
only:
|
only: *releaseable_branches
|
||||||
- triggers
|
before_script:
|
||||||
- master
|
- *determine_version
|
||||||
image: parity/rust:gitlab-ci
|
dependencies:
|
||||||
|
- build:linux:ubuntu:amd64
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-test.sh nightly
|
- scripts/gitlab/package-snap.sh
|
||||||
tags:
|
tags:
|
||||||
- rust
|
- rust-stable
|
||||||
- rust-nightly
|
<<: *collect_packages
|
||||||
allow_failure: true
|
|
||||||
push-release:
|
package:linux:snap:arm64:
|
||||||
|
<<: *package_snap
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: arm64
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:arm64
|
||||||
|
|
||||||
|
package:linux:snap:armhf:
|
||||||
|
<<: *package_snap
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: armhf
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:armhf
|
||||||
|
|
||||||
|
package-windows-exe-x86_64:
|
||||||
|
stage: package
|
||||||
|
only: *releaseable_branches
|
||||||
|
dependencies:
|
||||||
|
- build-windows-x86_64
|
||||||
|
script:
|
||||||
|
- sh scripts/gitlab/package-windows.sh
|
||||||
|
<<: *collect_packages
|
||||||
|
tags:
|
||||||
|
- rust-windows
|
||||||
|
|
||||||
|
#### stage: publish
|
||||||
|
|
||||||
|
publish:linux:snap:amd64: &publish_snap
|
||||||
|
stage: publish
|
||||||
|
only: *publishable_branches
|
||||||
|
image: snapcore/snapcraft:stable
|
||||||
|
before_script:
|
||||||
|
- *determine_version
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: amd64
|
||||||
|
dependencies:
|
||||||
|
- package:linux:snap:amd64
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-snap.sh
|
||||||
|
tags:
|
||||||
|
- rust-stable
|
||||||
|
|
||||||
|
publish:linux:snap:arm64:
|
||||||
|
<<: *publish_snap
|
||||||
|
before_script:
|
||||||
|
- *determine_version
|
||||||
|
- sleep 120
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: arm64
|
||||||
|
dependencies:
|
||||||
|
- package:linux:snap:arm64
|
||||||
|
|
||||||
|
publish:linux:snap:armhf:
|
||||||
|
<<: *publish_snap
|
||||||
|
before_script:
|
||||||
|
- *determine_version
|
||||||
|
- sleep 360
|
||||||
|
variables:
|
||||||
|
BUILD_ARCH: armhf
|
||||||
|
dependencies:
|
||||||
|
- package:linux:snap:armhf
|
||||||
|
|
||||||
|
publish:docker:parity:amd64: &publish_docker
|
||||||
|
stage: publish
|
||||||
|
only: *publishable_branches
|
||||||
|
dependencies:
|
||||||
|
- build:linux:ubuntu:amd64
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-docker.sh parity
|
||||||
|
|
||||||
|
publish:docker:parity-evm:amd64:
|
||||||
|
<<: *publish_docker
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/publish-docker.sh parity-evm
|
||||||
|
|
||||||
|
publish:github:
|
||||||
|
stage: publish
|
||||||
|
only: *publishable_branches
|
||||||
|
dependencies:
|
||||||
|
- package:ubuntu:deb:amd64
|
||||||
|
- package:ubuntu:deb:armhf
|
||||||
|
- package:ubuntu:deb:arm64
|
||||||
|
- package:debian:deb:amd64
|
||||||
|
- package:centos:rpm:x86_64
|
||||||
|
- package:macos:pkg:x86_64
|
||||||
|
- package-windows-exe-x86_64
|
||||||
|
before_script:
|
||||||
|
- *determine_version
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/push-github.sh
|
||||||
|
|
||||||
|
#### stage: push-release
|
||||||
|
|
||||||
|
push:release:
|
||||||
stage: push-release
|
stage: push-release
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- triggers
|
- triggers
|
||||||
image: parity/rust:gitlab-ci
|
image: parity/rust:gitlab-ci
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-push-release.sh
|
- scripts/gitlab/push-release.sh
|
||||||
tags:
|
tags:
|
||||||
- curl
|
- curl
|
||||||
|
@ -1,66 +1,27 @@
|
|||||||
FROM ubuntu:14.04
|
FROM ubuntu:xenial
|
||||||
MAINTAINER Parity Technologies <devops@parity.io>
|
MAINTAINER Parity Technologies <devops@parity.io>
|
||||||
WORKDIR /build
|
#set ENVIROMENT
|
||||||
#ENV for build TAG
|
ARG TARGET
|
||||||
ARG BUILD_TAG
|
ENV TARGET ${TARGET}
|
||||||
ENV BUILD_TAG ${BUILD_TAG:-master}
|
|
||||||
RUN echo "Build tag:" $BUILD_TAG
|
|
||||||
# install tools and dependencies
|
# install tools and dependencies
|
||||||
RUN apt-get update && \
|
RUN apt update && apt install -y --no-install-recommends openssl libudev-dev file
|
||||||
apt-get install -y --force-yes --no-install-recommends \
|
|
||||||
# make
|
|
||||||
build-essential \
|
|
||||||
# add-apt-repository
|
|
||||||
software-properties-common \
|
|
||||||
make \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
git \
|
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
libc6 \
|
|
||||||
libc6-dev \
|
|
||||||
binutils \
|
|
||||||
file \
|
|
||||||
openssl \
|
|
||||||
libssl-dev \
|
|
||||||
libudev-dev \
|
|
||||||
pkg-config \
|
|
||||||
dpkg-dev \
|
|
||||||
libudev-dev &&\
|
|
||||||
# install rustup
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
|
|
||||||
# rustup directory
|
|
||||||
PATH=/root/.cargo/bin:$PATH && \
|
|
||||||
# show backtraces
|
# show backtraces
|
||||||
RUST_BACKTRACE=1 && \
|
ENV RUST_BACKTRACE 1
|
||||||
# build parity
|
|
||||||
cd /build&&git clone https://github.com/paritytech/parity && \
|
|
||||||
cd parity && \
|
|
||||||
git pull&& \
|
|
||||||
git checkout $BUILD_TAG && \
|
|
||||||
cargo build --verbose --release --features final && \
|
|
||||||
#ls /build/parity/target/release/parity && \
|
|
||||||
strip /build/parity/target/release/parity && \
|
|
||||||
file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\
|
|
||||||
#cleanup Docker image
|
#cleanup Docker image
|
||||||
rm -rf /root/.cargo&&rm -rf /root/.multirust&&rm -rf /root/.rustup&&rm -rf /build&&\
|
RUN apt autoremove -y
|
||||||
apt-get purge -y \
|
RUN apt clean -y
|
||||||
# make
|
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
|
||||||
build-essential \
|
|
||||||
# add-apt-repository
|
#add TARGET to docker image
|
||||||
software-properties-common \
|
COPY artifacts/$TARGET /usr/bin/$TARGET
|
||||||
make \
|
|
||||||
curl \
|
# Build a shell script because the ENTRYPOINT command doesn't like using ENV
|
||||||
wget \
|
RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh
|
||||||
git \
|
RUN chmod +x ./entrypoint.sh
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
binutils \
|
|
||||||
file \
|
|
||||||
pkg-config \
|
|
||||||
dpkg-dev &&\
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
# setup ENTRYPOINT
|
# setup ENTRYPOINT
|
||||||
EXPOSE 8080 8545 8180
|
EXPOSE 8080 8545 8180
|
||||||
ENTRYPOINT ["/parity/parity"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit fb111c82deff8759f54a5038d07cecc77cb5a663
|
Subproject commit d9d6133c1bc5dca4c74c9eb758a39546a0d46b45
|
@ -34,16 +34,16 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
0A7A475C1E3D2CDD0093D1AB /* parity */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = parity; path = ../target/release/parity; sourceTree = "<group>"; };
|
0A7A475C1E3D2CDD0093D1AB /* parity */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = parity; path = ../artifacts/parity; sourceTree = "<group>"; };
|
||||||
0ACF9ABE1E30FAB600D5C935 /* Parity Ethereum.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Parity Ethereum.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
0ACF9ABE1E30FAB600D5C935 /* Parity Ethereum.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Parity Ethereum.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
0ACF9AC11E30FAB600D5C935 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
0ACF9AC11E30FAB600D5C935 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
0ACF9AC31E30FAB600D5C935 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
0ACF9AC31E30FAB600D5C935 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
0ACF9AC61E30FAB600D5C935 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
0ACF9AC61E30FAB600D5C935 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
0ACF9AC81E30FAB600D5C935 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
0ACF9AC81E30FAB600D5C935 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
0AE564F01E3CE42C00BD01F7 /* GetBSDProcessList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetBSDProcessList.swift; sourceTree = "<group>"; };
|
0AE564F01E3CE42C00BD01F7 /* GetBSDProcessList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetBSDProcessList.swift; sourceTree = "<group>"; };
|
||||||
0AED4D9F1E3E22F800BF87C0 /* ethstore */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethstore; path = ../target/release/ethstore; sourceTree = "<group>"; };
|
0AED4D9F1E3E22F800BF87C0 /* ethstore */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethstore; path = ../artifacts/ethstore; sourceTree = "<group>"; };
|
||||||
84CF92B2200E559900AD6E78 /* parity-evm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "parity-evm"; path = "../target/release/parity-evm"; sourceTree = "<group>"; };
|
84CF92B2200E559900AD6E78 /* parity-evm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "parity-evm"; path = "../artifacts/parity-evm"; sourceTree = "<group>"; };
|
||||||
84CF92B5200E56AE00AD6E78 /* ethkey */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethkey; path = ../target/release/ethkey; sourceTree = "<group>"; };
|
84CF92B5200E56AE00AD6E78 /* ethkey */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethkey; path = ../artifacts/ethkey; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
@ -626,7 +626,7 @@
|
|||||||
<key>BUILD_PATH</key>
|
<key>BUILD_PATH</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>PATH</key>
|
<key>PATH</key>
|
||||||
<string>../target/release</string>
|
<string>..</string>
|
||||||
<key>PATH_TYPE</key>
|
<key>PATH_TYPE</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -88,10 +88,10 @@ section "install"
|
|||||||
!insertmacro TerminateApp
|
!insertmacro TerminateApp
|
||||||
|
|
||||||
# Files added here should be removed by the uninstaller (see section "uninstall")
|
# Files added here should be removed by the uninstaller (see section "uninstall")
|
||||||
file /oname=parity.exe ..\target\x86_64-pc-windows-msvc\release\parity.exe
|
file /oname=parity.exe ..\artifacts\parity.exe
|
||||||
file /oname=parity-evm.exe ..\target\x86_64-pc-windows-msvc\release\parity-evm.exe
|
file /oname=parity-evm.exe ..\artifacts\parity-evm.exe
|
||||||
file /oname=ethstore.exe ..\target\x86_64-pc-windows-msvc\release\ethstore.exe
|
file /oname=ethstore.exe ..\artifacts\ethstore.exe
|
||||||
file /oname=ethkey.exe ..\target\x86_64-pc-windows-msvc\release\ethkey.exe
|
file /oname=ethkey.exe ..\artifacts\ethkey.exe
|
||||||
file /oname=ptray.exe ..\windows\ptray\x64\Release\ptray.exe
|
file /oname=ptray.exe ..\windows\ptray\x64\Release\ptray.exe
|
||||||
|
|
||||||
file "logo.ico"
|
file "logo.ico"
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e # fail on any error
|
|
||||||
set -u # treat unset variables as error
|
|
||||||
rm -rf deb
|
|
||||||
#create DEBIAN files
|
|
||||||
mkdir -p deb/usr/bin/
|
|
||||||
mkdir -p deb/DEBIAN
|
|
||||||
#create copyright, docs, compat
|
|
||||||
cp LICENSE deb/DEBIAN/copyright
|
|
||||||
echo "https://github.com/paritytech/parity/wiki" >> deb/DEBIAN/docs
|
|
||||||
echo "8" >> deb/DEBIAN/compat
|
|
||||||
#create control file
|
|
||||||
control=deb/DEBIAN/control
|
|
||||||
echo "Package: parity" >> $control
|
|
||||||
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
|
|
||||||
echo "Version: $version" >> $control
|
|
||||||
echo "Source: parity" >> $control
|
|
||||||
echo "Section: science" >> $control
|
|
||||||
echo "Priority: extra" >> $control
|
|
||||||
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
|
|
||||||
echo "Build-Depends: debhelper (>=9)" >> $control
|
|
||||||
echo "Standards-Version: 3.9.5" >> $control
|
|
||||||
echo "Homepage: https://parity.io" >> $control
|
|
||||||
echo "Vcs-Git: git://github.com/paritytech/parity.git" >> $control
|
|
||||||
echo "Vcs-Browser: https://github.com/paritytech/parity" >> $control
|
|
||||||
echo "Architecture: $1" >> $control
|
|
||||||
echo "Depends: libssl1.0.0 (>=1.0.0)" >> $control
|
|
||||||
echo "Description: Ethereum network client by Parity Technologies" >> $control
|
|
||||||
size=`du deb/|awk 'END {print $1}'`
|
|
||||||
echo "Installed-Size: $size" >> $control
|
|
||||||
#build .deb package
|
|
||||||
|
|
||||||
exit
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd docker/hub
|
|
||||||
DOCKER_BUILD_TAG=$1
|
|
||||||
echo "Docker build tag: " $DOCKER_BUILD_TAG
|
|
||||||
docker build --build-arg BUILD_TAG=$DOCKER_BUILD_TAG --no-cache=true --tag parity/parity:$DOCKER_BUILD_TAG .
|
|
||||||
docker run -it parity/parity:$DOCKER_BUILD_TAG -v
|
|
||||||
docker push parity/parity:$DOCKER_BUILD_TAG
|
|
@ -1,47 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#ARGUMENT test for RUST and COVERAGE
|
|
||||||
set -e # fail on any error
|
|
||||||
set -u # treat unset variables as error
|
|
||||||
if [[ "$CI_COMMIT_REF_NAME" = "master" || "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
|
|
||||||
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
|
|
||||||
else
|
|
||||||
export GIT_COMPARE=master;
|
|
||||||
fi
|
|
||||||
git fetch -a
|
|
||||||
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ -e ^docs/ | wc -l)"
|
|
||||||
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
|
|
||||||
TEST_SWITCH=$1
|
|
||||||
rust_test () {
|
|
||||||
git submodule update --init --recursive
|
|
||||||
rustup show
|
|
||||||
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
|
|
||||||
then echo "Skipping Rust tests since no Rust files modified.";
|
|
||||||
else ./test.sh || exit $?;
|
|
||||||
fi
|
|
||||||
# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
|
|
||||||
# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3
|
|
||||||
# then sh scripts/aura-test.sh; # || exit $?;
|
|
||||||
# fi
|
|
||||||
}
|
|
||||||
coverage_test () {
|
|
||||||
git submodule update --init --recursive
|
|
||||||
rm -rf target/*
|
|
||||||
scripts/cov.sh
|
|
||||||
}
|
|
||||||
case $TEST_SWITCH in
|
|
||||||
stable )
|
|
||||||
rustup default stable
|
|
||||||
rust_test
|
|
||||||
;;
|
|
||||||
beta)
|
|
||||||
rustup default beta
|
|
||||||
rust_test
|
|
||||||
;;
|
|
||||||
nightly)
|
|
||||||
rustup default nightly
|
|
||||||
rust_test
|
|
||||||
;;
|
|
||||||
test-coverage)
|
|
||||||
coverage_test
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,39 +0,0 @@
|
|||||||
name: parity
|
|
||||||
version: git
|
|
||||||
summary: Fast, light, robust Ethereum implementation
|
|
||||||
description: |
|
|
||||||
Parity's goal is to be the fastest, lightest, and most secure Ethereum
|
|
||||||
client. We are developing Parity using the sophisticated and cutting-edge
|
|
||||||
Rust programming language. Parity is licensed under the GPLv3, and can be
|
|
||||||
used for all your Ethereum needs.
|
|
||||||
|
|
||||||
grade: devel
|
|
||||||
confinement: strict
|
|
||||||
|
|
||||||
apps:
|
|
||||||
parity:
|
|
||||||
command: parity
|
|
||||||
plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland]
|
|
||||||
desktop: usr/share/applications/parity.desktop
|
|
||||||
|
|
||||||
icon: snap/gui/icon.png
|
|
||||||
|
|
||||||
parts:
|
|
||||||
desktop-icon:
|
|
||||||
source: ./snap
|
|
||||||
plugin: nil
|
|
||||||
prepare: |
|
|
||||||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications
|
|
||||||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
|
|
||||||
cp -v gui/parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/
|
|
||||||
cp -v gui/icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/
|
|
||||||
parity:
|
|
||||||
source: .
|
|
||||||
plugin: rust
|
|
||||||
build-attributes: [no-system-libraries]
|
|
||||||
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
|
||||||
stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6]
|
|
||||||
df:
|
|
||||||
plugin: nil
|
|
||||||
stage-packages: [coreutils]
|
|
||||||
stage: [bin/df]
|
|
Loading…
Reference in New Issue
Block a user