Skip to content

zizixmas/action-bmb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

action-bmb

GitHub Action for BMB compiler integration in CI/CD workflows.

Features

  • Cross-platform support (Linux, macOS, Windows)
  • Automatic caching for faster subsequent runs
  • Version pinning support
  • Optional command execution after setup
  • Z3 solver integration for contract verification

Quick Start

- uses: lang-bmb/action-bmb@v1

Usage

Basic Type Checking

name: BMB CI
on: [push, pull_request]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: lang-bmb/action-bmb@v1
      - run: bmb check .

Contract Verification

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Z3
        run: |
          sudo apt-get update
          sudo apt-get install -y z3

      - uses: lang-bmb/action-bmb@v1
      - run: bmb verify .

With Version Pinning

- uses: lang-bmb/action-bmb@v1
  with:
    version: '0.7.3'

Run Command After Setup

- uses: lang-bmb/action-bmb@v1
  with:
    command: 'check src/'

Inputs

Input Description Default
version BMB version to install latest
command BMB command to run after setup ``
working-directory Working directory for commands .
cache Enable installation caching true

Outputs

Output Description
version Installed BMB version
cache-hit Whether cache was hit

Examples

See the examples/ directory for complete workflow examples:

Local Installation

For local development, use the installation script:

curl -sSL https://raw.githubusercontent.com/lang-bmb/lang-bmb/main/ecosystem/action-bmb/scripts/install.sh | bash

Or with a specific version:

curl -sSL https://raw.githubusercontent.com/lang-bmb/lang-bmb/main/ecosystem/action-bmb/scripts/install.sh | bash -s 0.7.3

Environment Variables

Variable Description Default
BMB_VERSION Version to install latest
BMB_HOME Installation directory ~/.bmb

Requirements

  • Build Dependencies: Rust toolchain (cargo)
  • Contract Verification: Z3 SMT solver (optional)

BMB Commands

After setup, the following commands are available:

bmb check <file>     # Type check
bmb verify <file>    # Contract verification (requires Z3)
bmb test             # Run tests
bmb fmt <file>       # Format code
bmb run <file>       # Run with interpreter

License

MIT License - See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%