Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

fix: add build optimizations, increase channel size, add local cache #1889

fix: add build optimizations, increase channel size, add local cache

fix: add build optimizations, increase channel size, add local cache #1889

Workflow file for this run

name: Quality
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
readme:
name: Readme - checking readme compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/install-rust
with:
with_cache: false
tools: cargo-readme
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}}
- name: checking readme
run: ./scripts/check_readme.sh
audit:
name: Audit - crate security vulnerabilities
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/install-rust
with:
with_cache: false
tools: cargo-audit
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}}
- name: Cargo audit
run: cargo audit
lint:
name: Lint - Clippy
runs-on: ubuntu-latest-16-core
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
steps:
- name: Checkout topos repo
uses: actions/checkout@v4
- name: Install Rust
uses: ./.github/actions/install-rust
with:
components: clippy
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}}
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Checkout topos-smart-contracts repo
uses: actions/checkout@v4
with:
repository: topos-protocol/topos-smart-contracts
ref: ${{ env.CONTRACTS_REF }}
path: contracts
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: contracts/package-lock.json
- name: Install dependencies
working-directory: contracts
run: npm ci
- name: Build contracts
working-directory: contracts
run: npm run build
- name: Move contract artifacts
run: mv contracts/artifacts ./
- name: Cargo xclippy
run: cargo xclippy
fmt:
name: Check - Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/install-rust
with:
with_cache: false
toolchain: nightly
components: rustfmt
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}}
- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
msrv:
name: Check - MSRV
runs-on: ubuntu-latest-16-core
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/install-rust
with:
msrv: true
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY}}
- name: Cargo check
run: cargo check --workspace --all-features --locked