Skip to content

Renaming CI branch reference from casper-main -> main. #1

Renaming CI branch reference from casper-main -> main.

Renaming CI branch reference from casper-main -> main. #1

Workflow file for this run

name: Rust - Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Add extra targets
# Workaround for https://github.com/actions-rs/toolchain/issues/165
run: |
rustup target add thumbv7em-none-eabi
- name: Build (default features)
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
- name: Build (all features)
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-features
- name: Build wasmi itself as no_std
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --lib --no-default-features --target thumbv7em-none-eabi --exclude wasmi_cli
- name: Build (wasm32)
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --no-default-features --target wasm32-unknown-unknown
test:
name: Test
strategy:
matrix:
# windows-latest was pinned to windows-2019
# because of https://github.com/paritytech/wasmi/runs/5021520759
os: [ubuntu-latest, windows-2019, macos-latest]
include:
# Include a new variable `rustc-args` with `-- --test-threads 1`
# for windows-2019 to be used with virtual_memory crate feature
# enabled while testing.
- os: windows-2019
test-args: "--test-threads 1"
runs-on: ${{ matrix.os }}
steps:
- name: Configure Pagefile for Windows
if: matrix.os == 'windows-2019'
uses: al-cheb/[email protected]
with:
minimum-size: 6GB
maximum-size: 32GB
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Test (default features)
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '--cfg debug_assertions'
with:
command: test
args: --workspace --release
- name: Test (all features)
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '--cfg debug_assertions'
TEST_FLAGS: ${{ matrix.test-args }}
with:
command: test
args: --workspace --release --all-features -- $TEST_FLAGS
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rust-docs, rust-src
- uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: '-D warnings'
with:
command: doc
args: --workspace --all-features --no-deps --document-private-items
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: audit
args: ''
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- name: Clippy (default features)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace -- -D warnings
- name: Clippy (all features)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-features -- -D warnings
- name: Clippy (no_std)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --no-default-features -- -D warnings
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Run cargo-tarpaulin (default features)
uses: actions-rs/[email protected]
with:
version: '0.18.0'
args: --workspace
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml