mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-05-13 03:00:26 -04:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: ⚡ Cache rust
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
|
- name: ⚡ Cache nodejs
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/pilcom/node_modules
|
|
key: ${{ runner.os }}-pilcom-node-modules
|
|
- name: Install riscv target
|
|
run: rustup target add riscv32imc-unknown-none-elf
|
|
- name: Build
|
|
run: cargo build --verbose
|
|
- name: Install pilcom
|
|
# run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install
|
|
run: git clone https://github.com/chriseth/pilcom.git -b main && cd pilcom && npm install
|
|
- name: Run tests
|
|
run: PILCOM=$(pwd)/pilcom/ cargo test --verbose
|
|
- name: Lint
|
|
run: cargo clippy --all --all-features -- -D warnings
|
|
- name: Format
|
|
run: cargo fmt --check --verbose
|