maturin 0.11.0-beta.1

Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages
freebsd_instance:
  image_family: freebsd-12-2

env:
  RUST_BACKTRACE: 1
  # Workaround `error: sysinfo not supported on this platform`
  # seen on FreeBSD platforms, affecting rustup
  #
  # References: https://github.com/rust-lang/rustup/issues/2774
  RUSTUP_IO_THREADS: 1

freebsd_task:
  name: $TOOLCHAIN x86_64-unknown-freebsd
  env:
    matrix:
      - TOOLCHAIN: stable
  install_script:
    - pkg install -y curl bash python
  setup_script:
    - curl https://sh.rustup.rs -sSf --output rustup.sh
    - sh rustup.sh -y --default-toolchain $TOOLCHAIN
    - python -m ensurepip
    - python -m pip install --upgrade cffi virtualenv
  build_script:
    - $HOME/.cargo/bin/rustup run $TOOLCHAIN cargo build
  test_script:
    - $HOME/.cargo/bin/rustup run $TOOLCHAIN cargo test