Migrate CI to GitHub actions
This commit is contained in:
parent
ed9856f800
commit
a1e96c398f
|
@ -0,0 +1,41 @@
|
|||
on: [push, pull_request]
|
||||
|
||||
name: Continuous integration
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- rust: stable
|
||||
env:
|
||||
DO_FUZZ: true
|
||||
DO_COV: true
|
||||
AS_DEPENDENCY: true
|
||||
- rust: beta
|
||||
env:
|
||||
AS_DEPENDENCY: true
|
||||
- rust: nightly
|
||||
env:
|
||||
DO_BENCH: true
|
||||
AS_DEPENDENCY: true
|
||||
- rust: 1.29.0
|
||||
env:
|
||||
AS_DEPENDENCY: true
|
||||
PIN_VERSIONS: true
|
||||
steps:
|
||||
- name: Install test dependencies
|
||||
run: sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev
|
||||
- name: Checkout Crate
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout Toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- name: Running test script
|
||||
env: ${{ matrix.env }}
|
||||
run: ./contrib/test.sh
|
46
.travis.yml
46
.travis.yml
|
@ -1,46 +0,0 @@
|
|||
language: rust
|
||||
cache: cargo
|
||||
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- binutils-dev
|
||||
- libunwind8-dev
|
||||
- libcurl4-openssl-dev
|
||||
- libelf-dev
|
||||
- libdw-dev
|
||||
- cmake
|
||||
- gcc
|
||||
- libiberty-dev
|
||||
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- rust: stable
|
||||
env: DO_FUZZ=true DO_COV=true AS_DEPENDENCY=true
|
||||
- rust: beta
|
||||
env: AS_DEPENDENCY=true
|
||||
- rust: nightly
|
||||
env: DO_BENCH=true AS_DEPENDENCY=true
|
||||
- rust: 1.29.0
|
||||
env: AS_DEPENDENCY=true
|
||||
|
||||
script:
|
||||
- ./contrib/test.sh
|
||||
|
||||
after_success: |
|
||||
if [ "$DO_COV" = true ]; then
|
||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
||||
tar xzf master.tar.gz &&
|
||||
cd kcov-master &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake .. &&
|
||||
make &&
|
||||
make install DESTDIR=../../kcov-build &&
|
||||
cd ../.. &&
|
||||
rm -rf kcov-master &&
|
||||
for file in target/debug/bitcoin-*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done &&
|
||||
bash <(curl -s https://codecov.io/bash) &&
|
||||
echo "Uploaded code coverage"; fi
|
|
@ -3,7 +3,7 @@
|
|||
FEATURES="base64 bitcoinconsensus use-serde rand"
|
||||
|
||||
# Pin `cc` for Rust 1.29
|
||||
if [ "$TRAVIS_RUST_VERSION" = "1.29.0" ]; then
|
||||
if [ -n "$PIN_VERSIONS" ]; then
|
||||
cargo generate-lockfile --verbose
|
||||
cargo update -p cc --precise "1.0.41" --verbose
|
||||
cargo update -p serde --precise "1.0.98" --verbose
|
||||
|
@ -57,7 +57,7 @@ then
|
|||
echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml
|
||||
|
||||
# Pin `cc` for Rust 1.29
|
||||
if [ "$TRAVIS_RUST_VERSION" = "1.29.0" ]; then
|
||||
if [ -n "$PIN_VERSIONS" ]; then
|
||||
cargo generate-lockfile --verbose
|
||||
cargo update -p cc --precise "1.0.41" --verbose
|
||||
cargo update -p serde --precise "1.0.98" --verbose
|
||||
|
|
Loading…
Reference in New Issue