123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- on:
- push:
- branches:
- - main
- paths:
- - '**.rs'
- - '**/Cargo.toml'
- - '.github/workflows/loom.yml'
- workflow_dispatch:
- pull_request:
- paths:
- - '**.rs'
- - '**/Cargo.toml'
- - '.github/workflows/loom.yml'
- name: Loom Models
- env:
- LOOM_LOG: loom=debug
- jobs:
- # Run particularly slow loom models individually
- slow_models:
- strategy:
- matrix:
- model:
- - mpsc_send_recv_wrap
- - mpsc_try_send_recv
- - mpsc::rx_close_unconsumed
- - mpsc_sync::rx_close_unconsumed
- name: model '${{ matrix.model }}''
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - name: Run model
- run: cargo test --profile loom --lib -- ${{ matrix.model }}
- env:
- # it would be nice to run these with more preemptions, but
- # that makes these models super slow...and LOOM_MAX_PREEMPTIONS=1 is
- # good enough for Tokio's CI, so...
- LOOM_MAX_PREEMPTIONS: 1
- RUSTFLAGS: "--cfg loom"
- # Run other loom models by scope
- models:
- strategy:
- matrix:
- scope:
- # NOTE: if adding loom models in a new module, that module needs to be
- # added to this list!
- - mpsc_sync
- - mpsc_async
- - thingbuf
- - util
- name: models in '${{ matrix.scope }}'
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - name: Run models
- run: cargo test --profile loom --lib -- ${{ matrix.scope }}
- env:
- LOOM_MAX_PREEMPTIONS: 2
- # `--cfg ci_skip_slow_models` will exclude the loom models that are
- # tested in `slow-models`.
- RUSTFLAGS: "--cfg loom --cfg ci_skip_slow_models"
- # Dummy job that requires all loom models to pass
- all_models:
- name: all loom models
- runs-on: ubuntu-latest
- needs:
- - slow_models
- - models
- steps:
- - run: exit 0
|