script requires bash for source call #71
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: "PR" | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
workflow_dispatch: | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
cancel-in-progress: true | ||
jobs: | ||
<<<<<<< HEAD | ||
======= | ||
>>>>>>> origin/main | ||
fmt: | ||
name: "Run cargo fmt" | ||
runs-on: warp-ubuntu-latest-x64-4x | ||
steps: | ||
- name: "Checkout sources" | ||
uses: "actions/checkout@v4" | ||
- name: "Setup nightly toolchain" | ||
uses: "actions-rs/toolchain@v1" | ||
with: | ||
toolchain: "nightly" | ||
profile: "minimal" | ||
components: "rustfmt" | ||
override: true | ||
- name: "Check Rust format" | ||
run: | | ||
cargo fmt --all -- --check | ||
Build: | ||
name: "Build Reva" | ||
runs-on: warp-custom-big-disk | ||
steps: | ||
- name: "Checkout sources" | ||
uses: "actions/checkout@v4" | ||
- name: "remove default rust" | ||
run: | | ||
rustup self uninstall -y | ||
- name: Install Rust nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: clippy | ||
- name: "Make Dirs" | ||
run: | | ||
mkdir -p /home/runner/.local/bin | ||
sudo mkdir -p /valida-toolchain/ | ||
sudo chown $(whoami):users /valida-toolchain | ||
- name: Get cached Valida | ||
uses: WarpBuilds/[email protected] | ||
with: | ||
enableCrossArchArchive: true | ||
key: valida-latest | ||
path: /valida-toolchain/ | ||
- name: "Install Valida" | ||
run: | | ||
rustup toolchain link valida /valida-toolchain | ||
- name: "Build Reva" | ||
run: | | ||
cd bin/host | ||
cargo +valida build --target=x86_64-unknown-linux-gnu | ||
- name: "Build eth-client" | ||
run: | | ||
cd bin/eth-client | ||
cargo +valida build | ||
- name: "Run Reva Tests" | ||
run: | | ||
./scripts/test-client.sh |