when:
  - event: [manual, push, pull_request]
    branch: main

depends_on:
  - build-x86_64-linux-gnu

steps:
  - name: build-i686-linux-gnu
    image: i386/rust:latest
    environment:
      RUST_BACKTRACE: 1
      RUST_LOG: trace
      CARGO_INCREMENTAL: 0
    commands:
      - apt-get update --quiet
      - apt-get install --quiet --no-install-recommends --yes libclang-dev libc6-dev
      - cargo build --verbose --workspace --jobs=1 --target=i686-unknown-linux-gnu
      - cargo test --verbose --workspace --jobs=1 --target=i686-unknown-linux-gnu --no-run
      - cargo test --verbose --workspace --jobs=1 --target=i686-unknown-linux-gnu -- --test-threads=1 --nocapture
