Skip to content

move: init

move: init #1

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
RUST_BACKTRACE: 1
# Optional: set SUI_PATH (e.g. repository variable) to a Sui checkout path to run bytecode regression tests.
# If unset, bytecode tests are skipped and the job still passes.
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-action@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- name: Check format
run: cargo fmt --all -- --check
- name: Build
run: cargo build --all-targets
- name: Prepare bytecode for regression (optional)
if: env.SUI_PATH != ''
run: |
mkdir -p tests/bytecode/move_stdlib tests/bytecode/sui_framework
SUI="${{ env.SUI_PATH }}"
cp "$SUI/crates/sui-framework/build/Sui/bytecode_modules"/*.mv tests/bytecode/sui_framework/ 2>/dev/null || true
cp "$SUI/crates/sui-framework/build/Sui/bytecode_modules/dependencies/MoveStdlib"/*.mv tests/bytecode/move_stdlib/ 2>/dev/null || true
- name: Run tests
run: cargo test --all-targets
# Includes unit tests and integration tests (decompiler_regression, decompile_then_sui_move_build).
# If tests/bytecode/ has no .mv files, bytecode tests are skipped. If sui is not in PATH, build regression is skipped.
- name: Clippy
run: cargo clippy --all-targets -- -D warnings