Skip to content

Improve Python binding #334

Improve Python binding

Improve Python binding #334

Workflow file for this run

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
name: Tests
jobs:
test:
name: Test
strategy:
matrix:
bits: [16, 32, 64]
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings --cfg force_bits="${{ matrix.bits }}"
# Cap proptest case counts so property tests stay fast in per-PR CI.
PROPTEST_CASES: 256
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo test --all-features --workspace --exclude dashu-python --no-fail-fast
test-x86:
name: Test x86
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: i686-unknown-linux-gnu
- run: |
sudo apt update
sudo apt install gcc-multilib
- run: cargo test --target i686-unknown-linux-gnu --workspace --exclude dashu-python
test-x86_64:
name: Test x86_64
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- run: cargo test --target x86_64-unknown-linux-gnu --workspace --exclude dashu-python
test-no-std:
name: Test no-std
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo test --no-default-features --features rand --workspace --exclude dashu-python
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- name: Clippy (default / 64-bit Word)
run: cargo clippy --all-features --all-targets --workspace --exclude dashu-python -- -D warnings
- name: Clippy (32-bit Word)
env:
RUSTFLAGS: --cfg force_bits="32"
run: cargo clippy --all-features --all-targets --workspace --exclude dashu-python -- -D warnings