Skip to content

feat(float): implement arbitrary-precision trigonometric functions and constants #201

feat(float): implement arbitrary-precision trigonometric functions and constants

feat(float): implement arbitrary-precision trigonometric functions and constants #201

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
name: Tests
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, "1.85", "1.68"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Drop postgres/diesel/dev-deps for Rust 1.68
if: matrix.rust == '1.68'
run: python3 .github/workflows/drop_incompatible_deps_for_msrv.py
- name: Pin transitive deps for MSRV
if: matrix.rust != 'stable'
run: |
if [ "${{ matrix.rust }}" = "1.68" ]; then
echo "Pinning packages for Rust 1.68:"
echo " parking_lot -> 0.12.3"
echo " lock_api -> 0.4.12"
echo " quote -> 1.0.40"
echo " unicode-ident -> 1.0.13"
cargo update -p parking_lot --precise 0.12.3
cargo update -p lock_api --precise 0.4.12
cargo update -p quote --precise 1.0.40
cargo update -p unicode-ident --precise 1.0.13
elif [ "${{ matrix.rust }}" = "1.85" ]; then
echo "Pinning packages for Rust 1.85:"
echo " diesel -> 2.2.12"
cargo update -p diesel@2 --precise 2.2.12
fi
- run: cargo check --all-features --tests
if: matrix.rust != '1.68'
- run: cargo check --workspace --exclude dashu-python --features "std,num-order,serde,zeroize,rand,num-traits_v02"
if: matrix.rust == '1.68'
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 }}"
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
build-benchmark:
name: Build benchmark
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --features gmp
working-directory: benchmark
build-aarch64:
name: Build aarch64
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: aarch64-unknown-linux-gnu
- run: cargo build --target aarch64-unknown-linux-gnu --all-features --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
- run: cargo clippy --all-features --all-targets --workspace --exclude dashu-python -- -D warnings