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.

before_script:
  - getconf LONG_BIT
  - rustup self update
  - rustup --version
  - rustup toolchain install --profile minimal beta-$HOST 1.37.0-$HOST
  - rustup component add --toolchain beta-$HOST rustfmt clippy
  - if [ -d cargo/registry/cache ]; then rm -rf $CARGO_HOME/registry/cache; mkdir -p $CARGO_HOME/registry; cp -R cargo/registry/cache $CARGO_HOME/registry/; echo Copied registry/cache; fi
  - if [ -d $CARGO_HOME/registry/src ]; then rm -r $CARGO_HOME/registry/src; fi
  - if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi

after_script:
  - if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/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
  - rm -rf cargo
  - mkdir -p cargo/registry
  - if [ -d $CARGO_HOME/registry/cache ]; then cp -R $CARGO_HOME/registry/cache cargo/registry/; echo Updated registry/cache; fi

x86_64-gnulinux:
  image: amd64/rust:1
  variables:
    HOST: x86_64
  cache:
    key: $CI_JOB_NAME
    paths:
    - cargo/
  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
  except:
  - www

i686-gnulinux:
  image: i386/rust:1
  variables:
    HOST: i686
  cache:
    key: $CI_JOB_NAME
    paths:
    - cargo/
  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
  except:
  - www

x86_64-i686-gnulinux:
  image: amd64/rust:1
  variables:
    HOST: x86_64
    TARGET: i686-unknown-linux-gnu
  cache:
    key: $CI_JOB_NAME
    paths:
    - cargo/
  script:
  - apt-get update -qq && apt-get install -y -qq gcc-multilib libc6-dev-i386
  - rustup target add --toolchain beta-$HOST $TARGET
  - cargo +beta-$HOST test --target $TARGET --features fail-on-warnings
  - cargo +beta-$HOST test --release --target $TARGET --features fail-on-warnings
  - rm Cargo.lock
  - rustup target add --toolchain 1.37.0-$HOST $TARGET
  - cargo +1.37.0-$HOST test --target $TARGET --features fail-on-warnings
  - cargo +1.37.0-$HOST test --release --target $TARGET --features fail-on-warnings
  except:
  - www

#Disable use-system-libs tests until GMP, MPFR and MPC versions catch up
#
#x86_64-gnulinux-sys-libs:
#  image: amd64/rust:1
#  variables:
#    HOST: x86_64
#  cache:
#    key: $CI_JOB_NAME
#    paths:
#    - cargo/
#  script:
#  - apt-get -y update
#  - apt-get -y install libgmp-dev libmpfr-dev libmpc-dev
#  - cargo +beta-$HOST test --features "fail-on-warnings use-system-libs"
#  - cargo +beta-$HOST test --release --features "fail-on-warnings use-system-libs"
#  - cargo +beta-$HOST fmt -- --check
#  - cargo +beta-$HOST clippy --all-targets --features "fail-on-warnings use-system-libs"
#  - rm Cargo.lock
#  - cargo +1.37.0-$HOST test --features "fail-on-warnings use-system-libs"
#  - cargo +1.37.0-$HOST test --release --features "fail-on-warnings use-system-libs"
#  except:
#  - www
#
#i686-gnulinux-sys-libs:
#  image: i386/rust:1
#  variables:
#    HOST: i686
#  cache:
#    key: $CI_JOB_NAME
#    paths:
#    - cargo/
#  script:
#  - apt-get -y update
#  - apt-get -y install libgmp-dev libmpfr-dev libmpc-dev
#  - cargo +beta-$HOST test --features "fail-on-warnings use-system-libs"
#  - cargo +beta-$HOST test --release --features "fail-on-warnings use-system-libs"
#  - cargo +beta-$HOST fmt -- --check
#  - cargo +beta-$HOST clippy --all-targets --features "fail-on-warnings use-system-libs"
#  - rm Cargo.lock
#  - cargo +1.37.0-$HOST test --features "fail-on-warnings use-system-libs"
#  - cargo +1.37.0-$HOST test --release --features "fail-on-warnings use-system-libs"
#  except:
#  - www

pages:
  image: amd64/rust:1
  variables:
    TOOLCHAIN: nightly-x86_64
  script:
  - rustup toolchain install --profile minimal $TOOLCHAIN
  - rm -rf public
  - cp -R doc public
  - cargo +$TOOLCHAIN doc --no-deps
  - mv target/doc public/dev
  artifacts:
    paths:
    - public
  only:
  - master