smallvec 2.0.0-alpha.1

'Small vector' optimization: store up to a small number of items on the stack
Documentation
name: CI

on:
  push:
    branches: [v2]
  pull_request:
  workflow_dispatch:

jobs:
  linux-ci:
    name: Linux
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: ["stable", "beta", "nightly", "1.57.0"]
        include:
          - toolchain: stable
            env:
              DO_FUZZ: 1
          - toolchain: beta
            env:
              DO_FUZZ: 1
    steps:
      - uses: actions/checkout@v4

      - name: Install packages
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev

      - name: Install toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}

      - name: Cargo build
        run: cargo build --verbose

      - name: Cargo test
        run: cargo test --verbose

      - name: Cargo test w/ serde
        run: cargo test --verbose --features serde

      - name: Cargo check w/o default features
        if: matrix.toolchain == 'nightly'
        run: cargo check --verbose --no-default-features

      - name: Cargo test all features
        if: matrix.toolchain == 'nightly'
        run: cargo test --verbose --all-features

      - name: Cargo bench
        if: matrix.toolchain == 'nightly'
        run: cargo bench --verbose bench

      - name: miri
        if: matrix.toolchain == 'nightly'
        run: bash ./scripts/run_miri.sh
        env:
          MIRIFLAGS: '-Zmiri-tag-raw-pointers'

      - name: fuzz
        if: env.DO_FUZZ == '1'
        working-directory: fuzz
        run: ./travis_fuzz.sh

  no-std:
    name: no_std
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          target: thumbv7m-none-eabi
      - name: Cargo build
        run: cargo build --verbose

  build_result:
    name: homu build finished
    runs-on: ubuntu-latest
    needs:
      - "linux-ci"
      - "no-std"

    steps:
      - name: Mark the job as successful
        run: exit 0
        if: success()
      - name: Mark the job as unsuccessful
        run: exit 1
        if: "!success()"