aaa #2104
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: Rust | |
on: | |
push: | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test_debug: | |
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 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: Build | |
run: cargo build | |
- 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 | |
test_release: | |
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-release-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install nightly | |
run: rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install riscv target | |
run: rustup target add riscv32imc-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install stdlib | |
run: rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Build | |
run: cargo build --release | |
- name: Run tests | |
run: cargo test -r --verbose -- --ignored --nocapture |