GitHub Action for BMB compiler integration in CI/CD workflows.
- 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
- uses: lang-bmb/action-bmb@v1name: 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 .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 .- uses: lang-bmb/action-bmb@v1
with:
version: '0.7.3'- uses: lang-bmb/action-bmb@v1
with:
command: 'check src/'| 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 |
| Output | Description |
|---|---|
version |
Installed BMB version |
cache-hit |
Whether cache was hit |
See the examples/ directory for complete workflow examples:
basic.yml- Basic CI with type check and testsverify.yml- Contract verification workflowfull-ci.yml- Comprehensive CI/CD with matrix builds
For local development, use the installation script:
curl -sSL https://raw.githubusercontent.com/lang-bmb/lang-bmb/main/ecosystem/action-bmb/scripts/install.sh | bashOr 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| Variable | Description | Default |
|---|---|---|
BMB_VERSION |
Version to install | latest |
BMB_HOME |
Installation directory | ~/.bmb |
- Build Dependencies: Rust toolchain (cargo)
- Contract Verification: Z3 SMT solver (optional)
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 interpreterMIT License - See LICENSE for details.