name: features
on:
pull_request:
push:
branches: [main]
workflow_dispatch: {}
concurrency:
group: features-${{ github.ref }}
cancel-in-progress: true
jobs:
features:
name: features • ${{ matrix.os }} • ${{ matrix.config }} (nightly)
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
config: [default, no-default-features, all-features]
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: none
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Rust toolchain (nightly)
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy,rustfmt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: ${{ matrix.os }}-${{ matrix.config }}
- name: Set feature flags
id: flags
run: |
case "${{ matrix.config }}" in
default) echo "args=" >> "$GITHUB_OUTPUT" ;;
no-default-features) echo "args=--no-default-features" >> "$GITHUB_OUTPUT" ;;
all-features) echo "args=--all-features" >> "$GITHUB_OUTPUT" ;;
esac
- run: cargo +nightly test ${{ steps.flags.outputs.args }} -- --quiet
cross-arm:
name: cross-check • ${{ matrix.target }} • ${{ matrix.config }} (nightly)
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
config: [default, no-default-features, all-features]
include:
- target: aarch64-unknown-linux-gnu
apt_pkg: gcc-aarch64-linux-gnu
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
linker_bin: aarch64-linux-gnu-gcc
- target: armv7-unknown-linux-gnueabihf
apt_pkg: gcc-arm-linux-gnueabihf
linker_env: CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER
linker_bin: arm-linux-gnueabihf-gcc
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: none
steps:
- uses: actions/checkout@v4
- name: Rust toolchain (nightly)
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: ${{ matrix.target }}
- name: Install cross-linker
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.apt_pkg }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: cross-${{ matrix.target }}-${{ matrix.config }}
- name: Set feature flags
id: flags
run: |
case "${{ matrix.config }}" in
default) echo "args=" >> "$GITHUB_OUTPUT" ;;
no-default-features) echo "args=--no-default-features" >> "$GITHUB_OUTPUT" ;;
all-features) echo "args=--all-features" >> "$GITHUB_OUTPUT" ;;
esac
- name: cargo check (${{ matrix.target }})
run: |
# The linker env var name is target-specific
# (CARGO_TARGET_<TARGET>_LINKER), so export inline per matrix entry.
export ${{ matrix.linker_env }}=${{ matrix.linker_bin }}
cargo +nightly check --target ${{ matrix.target }} ${{ steps.flags.outputs.args }}
pyo3:
name: minarrow-pyo3 (nightly)
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: none
steps:
- uses: actions/checkout@v4
- name: Rust toolchain (nightly)
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy,rustfmt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: pyo3
workspaces: pyo3
- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Create venv and install PyArrow
working-directory: pyo3
run: |
python -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install "pyarrow>=14.0.0"
- name: cargo build (default features)
working-directory: pyo3
run: cargo +nightly build --all-features
- name: cargo test (FFI roundtrips)
working-directory: pyo3
env:
PYO3_PYTHON: ${{ github.workspace }}/pyo3/.venv/bin/python
PYTHONHOME: ${{ env.pythonLocation }}
PYTHONPATH: ${{ github.workspace }}/pyo3/.venv/lib/python3.12/site-packages
LD_LIBRARY_PATH: ${{ env.pythonLocation }}/lib
run: |
cargo +nightly test \
--no-default-features \
--features "datetime,extended_numeric_types,extended_categorical"