Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-04-28 21:28:32 +0300
committerGitHub <noreply@github.com>2017-04-28 21:28:32 +0300
commit0ea0f84a0df4ec9f6e929104b9be1ac1c6e22c76 (patch)
tree0d171a8c1b2871dea36835455c384e5ba4cf7194 /scripts
parent41739fb3e514c71482eef708cd44b5437184742f (diff)
[bcl] Add API diff targets (#4406)
With these targets we can generate a snapshot of the current Mono API in C# source code form. Whenever we make changes, we can rerun this to ensure we didn't inadvertently change the public API. It also outputs a diff in html form that we can show on CI.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ci/run-test-default.sh8
-rw-r--r--scripts/ci/util.sh11
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/ci/run-test-default.sh b/scripts/ci/run-test-default.sh
index 2e7c807d924..9b418f5adc0 100755
--- a/scripts/ci/run-test-default.sh
+++ b/scripts/ci/run-test-default.sh
@@ -97,4 +97,12 @@ if [[ ${label} == osx-* ]]
then ${TESTCMD} --label=ms-test-suite --timeout=30m make -w -C acceptance-tests check-ms-test-suite
else ${TESTCMD} --label=ms-test-suite --skip;
fi
+if [[ ${label} == 'ubuntu-1404-amd64' ]]; then
+ source ${MONO_REPO_ROOT}/scripts/ci/util.sh
+ if ${TESTCMD} --label=apidiff --timeout=15m --fatal make -w -C mcs -j4 mono-api-diff
+ then report_github_status "success" "API Diff" "No public API changes found."
+ else report_github_status "error" "API Diff" "The public API changed." "$BUILD_URL/Public_API_Diff/"
+ fi
+else ${TESTCMD} --label=apidiff --skip
+fi
rm -fr /tmp/jenkins-temp-aspnet*
diff --git a/scripts/ci/util.sh b/scripts/ci/util.sh
new file mode 100644
index 00000000000..d4b09e8a437
--- /dev/null
+++ b/scripts/ci/util.sh
@@ -0,0 +1,11 @@
+#!/bin/bash -e
+
+function report_github_status {
+ if [ -z "$1" ]; then echo "No status specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "$2" ]; then echo "No context specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "$3" ]; then echo "No description specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "${ghprbActualCommit}" ]; then echo "Not a pull request. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "${GITHUB_STATUS_AUTH_TOKEN}" ]; then echo "No auth token specified. Skipping GitHub manual status report."; return 1; fi;
+
+ wget -qO- --header "Content-Type: application/json" --post-data "{\"state\": \"$1\", \"context\":\"$2\", \"description\": \"$3\", \"target_url\": \"$4\"}" "https://api.github.com/repos/mono/mono/statuses/${ghprbActualCommit}?access_token=${GITHUB_STATUS_AUTH_TOKEN}"
+}