[go: up one dir, main page]

arrow2 0.6.1

Unofficial implementation of Apache Arrow spec in safe Rust
Documentation
name: Check and test

on: [push, pull_request]

jobs:
  # test the crate
  ubuntu-latest:
    name: Test full
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true # needed to test IPC, which are located in a submodule
      - name: Install Rust
        run: rustup update stable
      - uses: Swatinem/rust-cache@v1
      - name: Setup parquet files
        run: |
          apt update && apt install python3-pip python3-venv -y -q
          python3 -m venv venv
          venv/bin/pip install pip --upgrade
          venv/bin/pip install pyarrow==3
          venv/bin/python parquet_integration/write_parquet.py
      - name: Run
        run: cargo test --features full

  windows-and-macos:
    name: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true # needed to test IPC, which are located in a submodule
      - name: Install Rust
        run: rustup update stable
      - uses: Swatinem/rust-cache@v1
      - name: Run
        shell: bash
        run: ARROW2_IGNORE_PARQUET= cargo test --features full

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        run: rustup update stable
      - uses: Swatinem/rust-cache@v1
      - name: Install clippy
        run: rustup component add clippy
      - name: "clippy --all"
        run: cargo clippy --all --tests

  fmt:
    name: fmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        run: rustup update stable
      - uses: Swatinem/rust-cache@v1
      - name: Install rustfmt
        run: rustup component add rustfmt

      - run: cargo fmt

  miri-checks:
    name: Miri
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly-2021-07-09
          override: true
      - uses: Swatinem/rust-cache@v1
      - name: Install Miri
        run: |
          rustup component add miri
          cargo miri setup

      - name: Run
        # --skip io: miri can't handle opening of files, so we skip those
        run: cargo miri test --features full -- --skip io::parquet --skip io::ipc

  miri-checks-custom-allocator:
    name: MIRI with custom allocator
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly-2021-07-09
          override: true
      - uses: Swatinem/rust-cache@v1
      - name: Install Miri
        run: |
          rustup component add miri
          cargo miri setup

      - name: Run
        # --skip io: miri can't handle opening of files, so we skip those
        run: cargo miri test --features full,cache_aligned -- --skip io::parquet --skip io::ipc

  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Setup parquet files
        run: |
          apt update && apt install python3-pip python3-venv -y -q
          python3 -m venv venv
          venv/bin/pip install pip --upgrade
          venv/bin/pip install pyarrow==3
          venv/bin/python parquet_integration/write_parquet.py
      - uses: Swatinem/rust-cache@v1
      - name: Install tarpaulin
        run: cargo install cargo-tarpaulin
      - name: Run coverage
        run: |
          cargo tarpaulin --features cache_aligned --out Xml
          cargo tarpaulin --features full --out Xml
      - name: Report coverage
        continue-on-error: true
        run: bash <(curl -s https://codecov.io/bash)

  feature-compilation:
    name: Feature coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        run: rustup update stable
      - name: Setup all features
        run: cargo install cargo-all-features
      - uses: Swatinem/rust-cache@v1
      - name: Run
        run: cargo check-all-features

  cross:
    name: cross
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target:
          - wasm32-unknown-unknown
          - i686-unknown-linux-gnu
          - powerpc-unknown-linux-gnu
          - powerpc64-unknown-linux-gnu
          - mips-unknown-linux-gnu
          - arm-linux-androideabi
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          target: ${{ matrix.target }}
          override: true
      - uses: Swatinem/rust-cache@v1
      - uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: check
          args: --features=merge_sort,io_ipc,io_csv,io_print,io_json,io_parquet --target ${{ matrix.target }}

  linux-simd-test:
    name: SIMD
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true
      - uses: Swatinem/rust-cache@v1
      - name: Run
        # no need to run over all features: simd only affects the core
        run: cargo test --tests --no-default-features --features compute,simd