unitforge 0.4.3

A library for unit and quantity consistent computations in Rust
Documentation
image: "rust:latest"

stages:
  - lint
  - test
  - python

variables:
  CARGO_TERM_COLOR: always
  PIP_DISABLE_PIP_VERSION_CHECK: "1"

.default_rust:
  before_script:
    - rustc --version
    - cargo --version

.default_python:
  before_script:
    - apt-get update
    - apt-get install -y python3 python3-venv python3-dev pkg-config
    - python3 --version

# --------------------
# LINT
# --------------------

lint:
  stage: lint
  extends: .default_rust
  script:
    - ./test.sh lint-base
  allow_failure: true

lint_serde:
  stage: lint
  extends: .default_rust
  script:
    - ./test.sh lint-serde
  allow_failure: true

lint_strum:
  stage: lint
  extends: .default_rust
  script:
    - ./test.sh lint-strum
  allow_failure: true

lint_pyo3:
  stage: lint
  extends: .default_rust
  script:
    - ./test.sh lint-pyo3
  allow_failure: true

# --------------------
# RUST TESTS
# --------------------

test_base:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-base

test_serde:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-serde

test_strum:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-strum

test_no_ndarray:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-no-ndarray

test_serde_no_ndarray:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-serde-no-ndarray

test_strum_no_ndarray:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-strum-no-ndarray

test_plain_f64:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-plain-f64

test_plain_f64_serde:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-plain-f64-serde

test_plain_f32:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-plain-f32

test_plain_f32_serde:
  stage: test
  extends: .default_rust
  script:
    - ./test.sh test-plain-f32-serde

# --------------------
# PYTHON / PYO3
# --------------------

test_pyo3:
  stage: python
  extends:
    - .default_rust
    - .default_python
  script:
    - ./test.sh test-pyo3

typecheck_pyo3:
  stage: python
  extends:
    - .default_rust
    - .default_python
  script:
    - ./test.sh typecheck-pyo3