ci: cargo clean release builds before xtask test #1087
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rustfmt from the rust stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Rustfmt | |
run: cargo fmt --all -- --check | |
build_and_test: | |
name: testing | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cargo build | |
run: cargo build --verbose --all | |
- name: cargo test | |
run: cargo test --verbose --all | |
- name: cargo clean release builds | |
run: | | |
cargo clean -p ikura-node --release | |
cargo clean -p ikura-shim --release | |
cargo metadata --format-version 1 | jq -r '.target_directory' | |
cargo clean -p sov-demo-rollup --release --manifest-path demo/sovereign/Cargo.toml | |
cargo metadata --manifest-path demo/sovereign/Cargo.toml --format-version 1 | jq -r '.target_directory' | |
- name: cargo xtask test | |
run: cargo xtask test | |
- name: print logs | |
run: cat test_log/*.log | |
if: failure() |