Prepare for BelieveAthon #3046
Workflow file for this run
This file contains 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: framework-check | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "framework/**" | |
pull_request: | |
paths: | |
- "framework/**" | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: stable / fmt | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: cargo fmt --check | |
working-directory: ./framework | |
run: cargo fmt --check | |
clippy: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.toolchain }} / clippy | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [stable] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Setup sccache | |
uses: mozilla-actions/sccache-action@v0.0.5 | |
with: | |
version: "v0.8.1" | |
- name: Install ${{ matrix.toolchain }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "framework -> target" | |
- name: cargo clippy | |
working-directory: ./framework | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
doc: | |
runs-on: ubuntu-latest | |
name: nightly / doc | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Setup sccache | |
uses: mozilla-actions/sccache-action@v0.0.5 | |
with: | |
version: "v0.8.1" | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@nightly | |
- name: cargo doc | |
working-directory: ./framework | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
hack: | |
runs-on: ubuntu-latest | |
name: ubuntu / stable / features | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Setup sccache | |
uses: mozilla-actions/sccache-action@v0.0.5 | |
with: | |
version: "v0.8.1" | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "framework -> target" | |
- name: cargo hack | |
working-directory: ./framework | |
run: cargo hack --feature-powerset check --lib --tests | |
# Find any unused dependencies | |
unused-deps: | |
runs-on: ubuntu-latest | |
name: stable / unused-deps | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup sccache | |
uses: mozilla-actions/sccache-action@v0.0.5 | |
with: | |
version: "v0.8.1" | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Install cargo-machete | |
working-directory: ./framework | |
run: cargo install cargo-machete | |
- name: Install cargo-machete | |
working-directory: ./framework | |
run: cargo machete ./contracts/* ./packages/* |