Skip to content
Snippets Groups Projects
Unverified Commit 747b8112 authored by Wei Tang's avatar Wei Tang Committed by GitHub
Browse files

Setup Travis CI for shasper repo (#3)

* Add build scripts

* Add travis config

* Avoid committing wasm binary files

* Fix spec header test

* Add travis badge in README
parent a77fdf44
Branches
No related merge requests found
Pipeline #24444 canceled with stages
# Request an environment that provides sudo (that goes with larger containers)
# and a minimal language environment.
sudo: true
language: minimal
cache: cargo
branches:
only:
- master
env:
global:
- RUST_BACKTRACE=1
before_install:
# Check how much space we've got on this machine.
- df -h
script:
- ./scripts/ci.sh
after_script:
# Check how much free disk space left after the build
- df -h
# Substrate Shasper
[![Build Status](https://travis-ci.org/paritytech/shasper.svg?branch=master)](https://travis-ci.org/paritytech/shasper)
*Note: This is an experimental project. Everything will break, and it may disappear without any notice!*
This is an implementation of [Shasper](https://github.com/ethereum/eth2.0-specs) beacon chain using the [Substrate framework](https://github.com/paritytech/substrate).
......
......@@ -58,6 +58,6 @@ mod tests {
#[test]
fn spec_header_hash() {
assert_eq!(SpecHeader::default().hash(), H256::from("0x66cad4289cc03192dc9a0b7583d1075b17bb6b78bd91694cdd3ff5c57e31d744"));
assert_eq!(SpecHeader::default().spec_hash(), H256::from("0x66cad4289cc03192dc9a0b7583d1075b17bb6b78bd91694cdd3ff5c57e31d744"));
}
}
#!/usr/bin/env bash
# This script assumes that all pre-requisites are installed.
set -e
PROJECT_ROOT=`git rev-parse --show-toplevel`
source `dirname "$0"`/common.sh
export CARGO_INCREMENTAL=0
# Save current directory.
pushd .
cd $ROOT
for SRC in "${SRCS[@]}"
do
echo "*** Building wasm binaries in $SRC"
cd "$PROJECT_ROOT/$SRC"
./build.sh
cd - >> /dev/null
done
# Restore initial directory.
popd
#!/usr/bin/env bash
set -eux
sudo apt-get -y update
sudo apt-get install -y cmake pkg-config libssl-dev
# Install rustup and the specified rust toolchain.
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable -y
# Load cargo environment. Specifically, put cargo into PATH.
source ~/.cargo/env
rustc --version
rustup --version
cargo --version
./scripts/init.sh
./scripts/build.sh
cargo test --all --locked
#!/usr/bin/env bash
ROOT=`dirname "$0"`
# A list of directories which contain wasm projects.
SRCS=(
"runtime/wasm"
)
# Make pushd/popd silent.
pushd () {
command pushd "$@" > /dev/null
}
popd () {
command popd "$@" > /dev/null
}
#!/usr/bin/env bash
set -e
echo "*** Initialising WASM build environment"
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
# Temporarily install llvm-tools.
# See https://github.com/rust-lang/rust/issues/53813
# TODO: Remove this when fixed.
rustup component add llvm-tools-preview --toolchain nightly
rustup update stable
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
command -v wasm-gc || \
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment