From 217695ae8a6376ab7369102998986b4e4c7ca138 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Wed, 20 Oct 2021 13:04:35 +0100 Subject: [PATCH 1/3] Add bors / buildbot support. --- .buildbot.sh | 22 ++++++++++++++++++++++ bors.toml | 12 ++++++++++++ deny.toml | 7 +++++++ 3 files changed, 41 insertions(+) create mode 100644 .buildbot.sh create mode 100644 bors.toml create mode 100644 deny.toml diff --git a/.buildbot.sh b/.buildbot.sh new file mode 100644 index 0000000..fab2b0f --- /dev/null +++ b/.buildbot.sh @@ -0,0 +1,22 @@ +#! /bin/sh + +set -e + +export CARGO_HOME="`pwd`/.cargo" +export RUSTUP_HOME="`pwd`/.rustup" + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh +sh rustup.sh --default-host x86_64-unknown-linux-gnu --default-toolchain stable -y --no-modify-path + +export PATH=`pwd`/.cargo/bin/:$PATH + +cargo fmt --all -- --check +RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps + +cargo test +cargo test --release + +which cargo-deny || cargo install cargo-deny || true +if [ "X`which cargo-deny`" != "X" ]; then + cargo-deny check license +fi diff --git a/bors.toml b/bors.toml new file mode 100644 index 0000000..37b41e2 --- /dev/null +++ b/bors.toml @@ -0,0 +1,12 @@ +# The service providing the commit statuses to GitHub. +status = [ + "buildbot/buildbot-build-script" +] + +# Allow 5 minutes for builds. +timeout_sec = 300 + +# Have bors delete auto-merged branches +delete_merged_branches = true + +cut_body_after = "" diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..e9cac83 --- /dev/null +++ b/deny.toml @@ -0,0 +1,7 @@ +[licenses] +unlicensed = "deny" +confidence-threshold = 1.0 +allow = [ + "Apache-2.0", + "MIT", +] From 5e6105ea940229b24241d7d0fa2475a0993e8b09 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Wed, 20 Oct 2021 14:24:34 +0100 Subject: [PATCH 2/3] Allow other reasonable licenses. --- deny.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deny.toml b/deny.toml index e9cac83..bb6ed68 100644 --- a/deny.toml +++ b/deny.toml @@ -3,5 +3,8 @@ unlicensed = "deny" confidence-threshold = 1.0 allow = [ "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", "MIT", ] From 060fa1f4ec1b74033a9cbb7879d76d3dcaef799d Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Wed, 20 Oct 2021 14:30:59 +0100 Subject: [PATCH 3/3] Cross my fingers that updating rand solves licensing issues. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6bae95a..b84cedd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,4 @@ serde = { version="1.0", features=["derive"], optional=true } num-traits = "0.2" [dev-dependencies] -rand = "0.6" +rand = "0.8"