name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
rust_min: "1.81"
jobs:
stable_test:
name: Stable Rust Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Build
run: cargo build --verbose --all-features
- name: Test
run: cargo test --verbose --all-features
- name: Doc
run: cargo doc --verbose --all-features
- name: Format Check
run: cargo fmt --all --check
- name: Clippy Check
run: cargo clippy --all-features -- -D warnings
- name: Build without features
run: cargo build --verbose --no-default-features
- name: Build with only interpreter
run: cargo build --verbose --no-default-features --features interpreter
- name: Build with only transpiler
run: cargo build --verbose --no-default-features --features transpiler
- name: GDB Example
run: cargo build --verbose --example gdb_tcp --features debugger
- name: Embassy Example
run: cargo build --verbose --example embassy --features async
minrust_test:
name: Min Rust Version Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_min }}
- name: Build
run: cargo build --verbose