Skip to content

Versioning

Versioning #704

Workflow file for this run

on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- master
- 'test-ci/**'
name: Continuous integration
jobs:
Test:
name: Test - ${{ matrix.toolchain }} toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly, msrv]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Run tests"
run: cargo rbmt --lock-file existing test --toolchain ${{ matrix.toolchain }}
Windows:
name: Test - Windows stable toolchain
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Select toolchain"
uses: dtolnay/rust-toolchain@stable
- name: "Run tests"
run: cargo test
Check:
name: Check - ${{ matrix.task }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task: [lint, docs, docsrs]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Run ${{ matrix.task }}"
run: cargo rbmt --lock-file existing ${{ matrix.task }}
Format:
name: Format
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Check formatting"
run: cargo rbmt fmt --check
Wasm:
name: Check WASM
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- run: rustup target add wasm32-unknown-unknown
- run: cargo check --target wasm32-unknown-unknown
Fuzz:
name: Check Fuzz
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Install cargo-fuzz"
run: cargo rbmt tools cargo-fuzz
- name: "Check fuzz crate"
run: cargo rbmt --lock-file existing run --toolchain nightly -- check --manifest-path fuzz/Cargo.toml
- name: "Run fuzz target unit tests"
run: cargo rbmt --lock-file existing run --toolchain nightly -- test --manifest-path fuzz/Cargo.toml --bins
- name: "Run cargo-fuzz smoke tests"
run: |
set -euo pipefail
export RUSTUP_TOOLCHAIN="$(cargo rbmt toolchains --nightly)"
cargo fuzz list --fuzz-dir fuzz | while read -r target; do
echo "fuzzing $target"
cargo fuzz run --fuzz-dir fuzz "$target" -- -runs=1
done
ExternalJetLib:
name: External Jet Library
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Build external jet dylib"
run: cargo rbmt --lock-file existing run --toolchain stable -- build --manifest-path external-jet-lib-example/Cargo.toml --lib
- name: "Build external-lib-consumer binary"
run: cargo rbmt --lock-file existing run --toolchain stable -- build --manifest-path external-jet-lib-example/Cargo.toml --bin external-lib-consumer
- name: "Run external-lib-consumer with compiled dylib"
run: ./target/debug/external-lib-consumer ./target/debug/libexternal_jet_lib_example.so