Merge branch 'paritytech:master' into master #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: full | |
| jobs: | |
| nextest: | |
| uses: ./.github/workflows/nextest.yml | |
| with: | |
| profile: default | |
| secrets: inherit | |
| docs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Install protobuf-compiler | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/[email protected] | |
| with: | |
| target: wasm32-unknown-unknown | |
| components: rust-src | |
| toolchain: nightly-x86_64-unknown-linux-gnu | |
| - name: Install clang on ubuntu | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang libclang-dev | |
| - name: Build documentation | |
| run: cargo doc --workspace --all-features --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options | |
| - name: Deploy documentation | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: target/doc | |
| force_orphan: true | |
| doctest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/[email protected] | |
| - name: Install protobuf-compiler | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install clang on ubuntu | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang libclang-dev | |
| - uses: dtolnay/[email protected] | |
| with: | |
| target: wasm32-unknown-unknown | |
| components: rust-src | |
| toolchain: stable | |
| - run: cargo test --workspace --doc | |
| typos: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: crate-ci/typos@v1 | |
| clippy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.88.0 | |
| components: clippy | |
| - name: Install protobuf-compiler | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install clang on ubuntu | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang libclang-dev | |
| - uses: dtolnay/[email protected] | |
| with: | |
| target: wasm32-unknown-unknown | |
| components: rust-src | |
| toolchain: nightly-x86_64-unknown-linux-gnu | |
| - run: cargo clippy --workspace --all-targets --all-features | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| forge-fmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/[email protected] | |
| - name: Install protobuf-compiler | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install clang on ubuntu | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang libclang-dev | |
| - name: forge fmt | |
| shell: bash | |
| run: ./.github/scripts/format.sh --check | |
| crate-checks: | |
| runs-on: parity-large-new | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install clang and zip on ubuntu | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang libclang-dev zip | |
| - name: Install build-essential for tikv-jemalloc-sys | |
| run: | | |
| sudo apt-get install -y build-essential | |
| - uses: dtolnay/[email protected] | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@cargo-hack | |
| - name: Install protobuf-compiler | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/[email protected] | |
| with: | |
| target: wasm32-unknown-unknown | |
| components: rust-src | |
| toolchain: stable | |
| # Exclude substrate-runtime because it can only be compiled for wasm32 without the std feature. | |
| # It's anyway compiled without std when building anvil-polkadot (by the wasm builder). | |
| - run: cargo hack check --each-feature --exclude-features isolate-by-default --exclude substrate-runtime | |
| # Add another step for running cargo check on substrate runtime (without excluding the default std feature) | |
| - run: cargo hack check -p substrate-runtime --each-feature --exclude-no-default-features | |
| deny: | |
| # Copy of ithacaxyz/ci/.github/workflows/deny.yml@main but without failing the CI | |
| name: cargo deny check | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| - name: Install cargo-deny | |
| uses: taiki-e/install-action@cargo-deny | |
| - name: Run cargo deny | |
| run: cargo deny --all-features check all | |
| ci-success: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - nextest | |
| - docs | |
| - doctest | |
| - clippy | |
| - rustfmt | |
| - forge-fmt | |
| - crate-checks | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |