gmp-mpfr-sys 1.4.1

Rust FFI bindings for GMP, MPFR and MPC
Documentation
# Copyright © 2017–2020 University of Malta

# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

skip_tags: true

branches:
  except:
    - www

environment:
  matrix:
    - HOST: x86_64-pc-windows-gnu
      CONFIG_SITE: C:/msys64/mingw64/etc/config.site
      MINGW_CHOST: x86_64-w64-mingw32
      MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
      MINGW_PREFIX: C:/msys64/mingw64
      MSYSTEM: MINGW64
      MSYSTEM_CARCH: x86_64
      MSYSTEM_CHOST: x86_64-w64-mingw32
      MSYSTEM_PREFIX: C:/msys64/mingw64
      PKG_CONFIG_PATH: C:\msys64\mingw64\lib\pkgconfig;C:\msys64\mingw64\share\pkgconfig
    - HOST: i686-pc-windows-gnu
      CONFIG_SITE: C:/msys64/mingw32/etc/config.site
      MINGW_CHOST: i686-w64-mingw32
      MINGW_PACKAGE_PREFIX: mingw-w64-i686
      MINGW_PREFIX: C:/msys64/mingw32
      MSYSTEM: MINGW32
      MSYSTEM_CARCH: i686
      MSYSTEM_CHOST: i686-w64-mingw32
      MSYSTEM_PREFIX: C:/msys64/mingw32
      PKG_CONFIG_PATH: C:\msys64\mingw32\lib\pkgconfig;C:\msys64\mingw32\share\pkgconfig

cache:
  - '%USERPROFILE%\.cargo\registry\cache -> Cargo.toml'

install:
  - set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%USERPROFILE%\.cargo\bin;%PATH%
  - curl -sSf -o rustup-init.exe https://win.rustup.rs
  - rustup-init.exe -y --default-host %HOST% --default-toolchain none --no-modify-path
  - rustup --version
  - rustup toolchain install --profile minimal beta-%HOST% 1.37.0-%HOST%
  - rustup component add --toolchain beta-%HOST% rustfmt clippy

build: false

before_test:
  - bash -c "if [ -d $USERPROFILE/.cargo/registry/src ]; then rm -r $USERPROFILE/.cargo/src; fi"
  - bash -c "if [ -d $USERPROFILE/.cargo/registry/cache ]; then cd $USERPROFILE/.cargo/registry; find cache -name \*.crate; fi"

test_script:
  - cargo +beta-%HOST% test --features fail-on-warnings
  - cargo +beta-%HOST% test --release --features fail-on-warnings
  - cargo +beta-%HOST% fmt -- --check
  - cargo +beta-%HOST% clippy --all-targets --features fail-on-warnings
  - rm Cargo.lock
  - cargo +1.37.0-%HOST% test --features fail-on-warnings
  - cargo +1.37.0-%HOST% test --release --features fail-on-warnings
  # Update libs now to make sure the update does not interfere with gcc
  - curl -O https://repo.msys2.org/msys/x86_64/pacman-5.2.2-1-x86_64.pkg.tar.xz
  - pacman -U --noconfirm pacman-5.2.2-1-x86_64.pkg.tar.xz
  - curl -O https://repo.msys2.org/mingw/%MSYSTEM_CARCH%/%MINGW_PACKAGE_PREFIX%-gmp-6.2.0-1-any.pkg.tar.xz
  - pacman -U --noconfirm %MINGW_PACKAGE_PREFIX%-gmp-6.2.0-1-any.pkg.tar.xz
  - curl -O https://repo.msys2.org/mingw/%MSYSTEM_CARCH%/%MINGW_PACKAGE_PREFIX%-mpfr-4.1.0-2-any.pkg.tar.zst
  - pacman -U --noconfirm %MINGW_PACKAGE_PREFIX%-mpfr-4.1.0-2-any.pkg.tar.zst
  # disable MPC from use-system-libs tests until MPC version catches up
  # - curl -O https://repo.msys2.org/mingw/%MSYSTEM_CARCH%/%MINGW_PACKAGE_PREFIX%-mpc-1.2.0-1-any.pkg.tar.zst
  # - pacman -U --noconfirm %MINGW_PACKAGE_PREFIX%-mpc-1.2.0-1-any.pkg.tar.zst
  - cargo clean
  - cargo +beta-%HOST% test --no-default-features --features "fail-on-warnings use-system-libs mpfr"
  - cargo +beta-%HOST% test --no-default-features --release --features "fail-on-warnings use-system-libs mpfr"

after_test:
  - bash -c "if [ -d $USERPROFILE/.cargo/registry/cache ]; then cd $USERPROFILE/.cargo/registry; for c in cache/*/*.crate; do s=src/${c#cache/}; if [ ! -e ${s/.crate/} ]; then rm -v $c; fi; done; find cache -name \*.crate; fi"