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

Build custom parity as part of ci #152

Merged
merged 48 commits into from
May 29, 2019
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6847610
circleci: add more dependencies
JakeOShannessy May 28, 2019
cc94870
circleci: remove gflags
JakeOShannessy May 28, 2019
6405150
circleci: try different gflags package name
JakeOShannessy May 28, 2019
31f38b9
circleci: add perl and yasm
JakeOShannessy May 29, 2019
762edeb
circleci: see if we can use parity's image
JakeOShannessy May 29, 2019
09ac0bf
circleci: remove sudo
JakeOShannessy May 29, 2019
7f8dcdf
circleci: remove install line
JakeOShannessy May 29, 2019
8dcc9b3
circleci: try building parity's branch
JakeOShannessy May 29, 2019
5b4b72a
Copy example from parity's docker image
JakeOShannessy May 29, 2019
6f85428
circleci: actually clone parity
JakeOShannessy May 29, 2019
d9eded9
circleci: switch to stable parity
JakeOShannessy May 29, 2019
3d09fef
circleci: build syn first
JakeOShannessy May 29, 2019
c076db6
circleci: build syn from git
JakeOShannessy May 29, 2019
c981f44
circleci: dev build
JakeOShannessy May 29, 2019
774bfc8
circleci: build 1 package at a time
JakeOShannessy May 29, 2019
df48168
circleci: save cache after parity build
JakeOShannessy May 29, 2019
4000436
Revert "circleci: save cache after parity build"
JakeOShannessy May 29, 2019
e94c635
circleci: save cache after parity build
JakeOShannessy May 29, 2019
cba64d0
circleci: checkout code
JakeOShannessy May 29, 2019
5b110c2
circleci: restore cache
JakeOShannessy May 29, 2019
dc8f074
circleci: cache parity builds
JakeOShannessy May 29, 2019
e2bfc98
circleci: version bump deps
JakeOShannessy May 29, 2019
1c59ace
circleci: install parity stage
JakeOShannessy May 29, 2019
6bc0dc7
circleci: don't update rust
JakeOShannessy May 29, 2019
1c1a78c
circleci: set default toolchain
JakeOShannessy May 29, 2019
56e7099
circleci: reorder rustup
JakeOShannessy May 29, 2019
97f4bad
circleci: check for the existence of cargo
JakeOShannessy May 29, 2019
126bc5e
circleci: only install not build then install
JakeOShannessy May 29, 2019
70d7eb3
circleci: install this package
JakeOShannessy May 29, 2019
2b467b9
circleci: formatting
JakeOShannessy May 29, 2019
dbaa2fc
Don't update rust
JakeOShannessy May 29, 2019
d0eaf0b
circleci: cache rustup
JakeOShannessy May 29, 2019
fd70278
circleci: update PATH
JakeOShannessy May 29, 2019
55a95d7
circleci: checkout code
JakeOShannessy May 29, 2019
82405c6
circleci: fix .profile
JakeOShannessy May 29, 2019
8f5464c
circleci: force overwrite of parity node
JakeOShannessy May 29, 2019
93d9c7e
circleci: wrong line
JakeOShannessy May 29, 2019
b726332
circleci: add log line
JakeOShannessy May 29, 2019
e0aa815
circleci: more log lines
JakeOShannessy May 29, 2019
d3e3883
circleci: fix cache path
JakeOShannessy May 29, 2019
52028d1
circleci: properly namespace directories
JakeOShannessy May 29, 2019
e430223
circleci: fix yaml syntax error
JakeOShannessy May 29, 2019
8e8c06c
circleci: install nodejs
JakeOShannessy May 29, 2019
55685c4
circleci: add repo for nodejs
JakeOShannessy May 29, 2019
02e0e0e
circleci: add missing -y
JakeOShannessy May 29, 2019
596e964
circleci: install newer version of node
JakeOShannessy May 29, 2019
6109798
circleci: use .xz
JakeOShannessy May 29, 2019
72616dd
circleci: switch parity to master
JakeOShannessy May 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 70 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
# build-evm:
Expand Down Expand Up @@ -42,27 +38,83 @@ jobs:
# - run: cd evm1 && ./node_modules/.bin/truffle test
build:
docker:
- image: ccistaging/rust:1-node
- image: centos:latest
working_directory: /tmp/my-project
steps:
- checkout
- run:
name: Get Submodules
command: |
git submodule update --init
- restore_cache:
keys:
- deps3-{{ .Branch }}-{{ .Revision }}
# - deps3-{{ .Branch }}-cargo-{{ checksum "kernel-ewasm/Cargo.lock" }}
- deps3-{{ .Branch }}-
- deps6-{{ .Branch }}-{{ .Revision }}
# - deps6-{{ .Branch }}-cargo-{{ checksum "kernel-ewasm/Cargo.lock" }}
- deps6-{{ .Branch }}-
- deps6-
- run:
name: Install native build prequisites
command: |
yum -y update
yum install -y systemd-devel git make gcc-c++ gcc file binutils
curl -L "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz" -o cmake.tar.gz
tar -xzf cmake.tar.gz
cp -r cmake-3.12.0-Linux-x86_64/* /usr/
echo "PATH=/root/.cargo/bin:$PATH" >> ~/.profile
# only update cargo if it is not installed
if [ ! -d /root/.rustup ]
then
echo "Installing rustup"
curl https://sh.rustup.rs -sSf | sh -s -- -y
. ~/.profile
rustup default stable
else
echo "rustup already installed"
. ~/.profile
fi
RUST_BACKTRACE=1
rustc -vV
cargo -V
gcc -v
g++ -v
cmake --version
curl -L https://nodejs.org/dist/v12.3.1/node-v12.3.1-linux-x64.tar.xz -o node.tar.xz
tar -xJf node.tar.xz
cp -r node-v12.3.1-linux-x64/* /usr/
- run:
name: Install Parity
command: |
sudo apt install -y cmake
cargo install --git https://github.com/Daohub-io/parity-ethereum.git --bin parity parity-ethereum
. ~/.profile
cd ..
# If the parity-ethereum directory does not exist, clone it
pwd
ls
if [ ! -d parity-ethereum ]
then
echo "Parity not installed, cloning..."
git clone https://github.com/Daohub-io/parity-ethereum.git
fi
cd parity-ethereum
git fetch --all
git checkout master
# cargo build -j 1
# cargo build --verbose --release --features final
# strip target/debug/parity
# file target/debug/parity
cargo install --bin parity -j 1 --path . --bin parity parity-ethereum --force
- save_cache:
key: deps6-{{ .Branch }}-cargo #-{{ checksum "kernel-ewasm/Cargo.lock" }}
paths:
- "~/.cargo"
- "~/.rustup"
- /tmp/parity-ethereum
- checkout:
path: cap9
- run:
name: Get Submodules
command: |
cd cap9
git submodule update --init
- run:
name: Start local Ethereum network
command: |
. ~/.profile
cd cap9
cd kernel-ewasm
# we need to run parity once to set up the accounts and keys
# this only needs to be active for a few seconds (hence timeout)
Expand All @@ -77,13 +129,12 @@ jobs:
- run:
name: Build Rust Component
command: |
. ~/.profile
cd cap9
cd kernel-ewasm && ./build.sh
- save_cache:
key: deps3-{{ .Branch }}-cargo #-{{ checksum "kernel-ewasm/Cargo.lock" }}
paths:
- "~/.cargo"
- run:
name: Test Rust Component
command: |
cd cap9
cd kernel-ewasm && npm install
npm run test