Skip to content

Commit

Permalink
Rebuild CI system (paritytech#96)
Browse files Browse the repository at this point in the history
* Fix ci GA

* Add wasm workflow

* Pin to some nightly version for wasm

* Install wasm-gc

* Add --git

* Add wasm badge

* Add stale workflow
  • Loading branch information
liuchengxu authored May 28, 2020
1 parent 5b4f759 commit 64de331
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 10 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: ci
on:
pull_request:
push:
branches:
- master
- develop

on: [push, pull_request]

env:
CARGO_INCREMENTAL: 0
Expand Down Expand Up @@ -62,9 +58,6 @@ jobs:
- name: Compile
run: cargo test --no-run

- name: Compile wasm
run: cd runtime/wasm && bash build.sh

- name: Test
run: cargo test --all --exclude substrate-rpc

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
exempt-issue-labels: 'bug,awaiting-approval,work-in-progress'
stale-pr-label: 'no-pr-activity'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
56 changes: 56 additions & 0 deletions .github/workflows/wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: wasm

on: [push, pull_request]

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CI: 1
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:
rust:
name: Rust
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2020-03-19
target: wasm32-unknown-unknown
profile: minimal
override: true

- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/

- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Compile wasm
run: cargo install --git https://github.com/alexcrichton/wasm-gc && cd runtime/wasm && bash build.sh
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ChainX

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE)
[![CI](https://github.com/chainpool/ChainX/workflows/ci/badge.svg)](https://github.com/chainpool/ChainX/actions?workflow=ci)
[![CI](https://github.com/chainx-org/ChainX/workflows/ci/badge.svg)](https://github.com/chainx-org/ChainX/actions?workflow=ci)
[![WASM](https://github.com/chainx-org/ChainX/workflows/wasm/badge.svg)](https://github.com/chainx-org/ChainX/actions?workflow=wasm)

[ChainX](https://github.com/chainx-org/ChainX) is a community-driven project built on the next-generation blockchain framework [substrate](https://github.com/paritytech/substrate), the largest Layer-2 network of Bitcoin using the Light-client protocol with smart contract support, will evolve into the Polkadot network as a secondary relay chain in the future.

Expand Down

0 comments on commit 64de331

Please sign in to comment.