name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run:
cargo build --verbose
- name: Build Windows 32 bits
run: |
rustup target add i686-pc-windows-msvc
cargo build --target i686-pc-windows-msvc
- name: Build 64 bit CPU, 32 bit address space
run: |
rustup target add x86_64-unknown-linux-gnux32
cargo build --target x86_64-unknown-linux-gnux32
- name: Build WASM32
run: |
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown
- name: Build Arm7 linux gnu
run: |
rustup target add armv7-unknown-linux-gnueabi
cargo build --target armv7-unknown-linux-gnueabi
- name: Build x86_64 apple
run: |
rustup target add x86_64-apple-darwin
cargo build --target x86_64-apple-darwin
- name: Run tests
run: cargo test --verbose
- name: Run all tests with all features + ignored
run: |
cargo test --release --verbose --all-features
cargo test --release --verbose --all-features -- --ignored
- name: Run tests with no features (safe Rust)
run: cargo test --verbose --no-default-features
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Pytest
run: |
pip install pytest
pip install .
pytest tests