"
- exit 1
-fi;
-# Commit to diff against
-COMMIT="$1"
-# output directory for test results
-OUTPUT_DIR="$2"
-# root directory, where the config files are located
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-
-if [ ! -f "compile_commands.json" ] ; then
- echo "Could not find compile commands.json in $(pwd)"
- exit 1
-fi
-
-# clang-format
-# Let clang format apply patches --diff doesn't produces results in the format we want.
-git-clang-format "${COMMIT}"
-set +e
-git diff -U0 --exit-code --no-prefix | "${DIR}/ignore_diff.py" "${DIR}/clang-format.ignore" > "${OUTPUT_DIR}"/clang-format.patch
-set -e
-# Revert changes of git-clang-format.
-git checkout -- .
-
-# clang-tidy
-git diff -U0 --no-prefix "${COMMIT}" | "${DIR}/ignore_diff.py" "${DIR}/clang-tidy.ignore" | clang-tidy-diff -p0 -quiet | sed "/^[[:space:]]*$/d" > "${OUTPUT_DIR}"/clang-tidy.txt
-
-echo "linters completed ======================================"
diff --git a/scripts/phabtalk/add_url_artifact.py b/scripts/phabtalk/add_url_artifact.py
index 81bcdd2..32da386 100755
--- a/scripts/phabtalk/add_url_artifact.py
+++ b/scripts/phabtalk/add_url_artifact.py
@@ -21,8 +21,6 @@ import uuid
if __name__ == '__main__':
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-# from phabtalk import PhabTalk
-# else:
from phabtalk.phabtalk import PhabTalk
diff --git a/scripts/phabtalk/phabtalk.py b/scripts/phabtalk/phabtalk.py
index 15d0c1a..1908fc7 100755
--- a/scripts/phabtalk/phabtalk.py
+++ b/scripts/phabtalk/phabtalk.py
@@ -12,23 +12,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Upload build results to Phabricator.
+"""
+Interactions with Phabricator.
+"""
-As I did not like the Jenkins plugin, we're using this script to upload the
-build status, a summary and the test reults to Phabricator."""
-
-import argparse
-import os
-import re
import socket
import time
-import urllib
import uuid
from typing import Optional, List, Dict
-import pathspec
-from lxml import etree
from phabricator import Phabricator
-from enum import IntEnum
class PhabTalk:
@@ -150,49 +142,6 @@ class PhabTalk:
artifactData=artifact_data))
-def _parse_patch(patch) -> List[Dict[str, str]]:
- """Extract the changed lines from `patch` file.
- The return value is a list of dictionaries {filename, line, diff}.
- Diff must be generated with -U0 (no context lines).
- """
- entries = []
- lines = []
- filename = None
- line_number = 0
- for line in patch:
- match = re.search(r'^(\+\+\+|---) [^/]+/(.*)', line)
- if match:
- if len(lines) > 0:
- entries.append({
- 'filename': filename,
- 'diff': ''.join(lines),
- 'line': line_number,
- })
- lines = []
- filename = match.group(2).rstrip('\r\n')
- continue
- match = re.search(r'^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))?', line)
- if match:
- if len(lines) > 0:
- entries.append({
- 'filename': filename,
- 'diff': ''.join(lines),
- 'line': line_number,
- })
- lines = []
- line_number = int(match.group(1))
- continue
- if line.startswith('+') or line.startswith('-'):
- lines.append(line)
- if len(lines) > 0:
- entries.append({
- 'filename': filename,
- 'diff': ''.join(lines),
- 'line': line_number,
- })
- return entries
-
-
class Step:
def __init__(self):
self.name = ''
@@ -236,292 +185,6 @@ class Report:
self.artifacts.append({'dir': dir, 'file': file, 'name': name})
-class BuildReport:
-
- def __init__(self, args):
- # self.args = args
- self.ph_id = args.ph_id # type: str
- self.diff_id = args.diff_id # type: str
- self.test_result_file = args.test_result_file # type: str
- self.conduit_token = args.conduit_token # type: str
- self.dryrun = args.dryrun # type: bool
- self.buildresult = args.buildresult # type: str
- self.clang_format_patch = args.clang_format_patch # type: str
- self.clang_tidy_result = args.clang_tidy_result # type: str
- self.clang_tidy_ignore = args.clang_tidy_ignore # type: str
- self.results_dir = args.results_dir # type: str
- self.results_url = args.results_url # type: str
- self.workspace = args.workspace # type: str
- self.failure_messages = args.failures # type: str
- self.name = args.name # type: str
-
- self.api = PhabTalk(args.conduit_token, args.host, args.dryrun)
-
- self.revision_id = self.api.get_revision_id(self.diff_id)
- self.comments = []
- self.success = True
- self.working = False
- self.unit = [] # type: List
- self.lint = {}
- self.test_stats = {
- 'pass': 0,
- 'fail': 0,
- 'skip': 0
- } # type: Dict[str, int]
-
- def add_lint(self, m):
- key = '{}:{}'.format(m['path'], m['line'])
- if key not in self.lint:
- self.lint[key] = []
- self.lint[key].append(m)
-
- def final_report(self):
- if self.buildresult is not None:
- print('Jenkins result: {}'.format(self.buildresult))
- if self.buildresult.lower() == 'success':
- pass
- elif self.buildresult.lower() == 'null':
- self.working = True
- else:
- self.success = False
- else:
- self.success = False
-
- try:
- self.add_test_results()
- except etree.XMLSyntaxError:
- # Sometimes we get an incomplete XML file.
- # In this case:
- # - fail the build (the safe thing to do)
- # - continue so the user gets some feedback.
- print('Error parsing {}. Invalid XML syntax!'.format(self.test_result_file))
- self.success = False
-
- self.add_clang_tidy()
- self.add_clang_format()
- self.api.update_build_status(self.diff_id, self.ph_id, self.working, self.success, self.lint, self.unit)
-
- self.add_links_to_artifacts()
-
- title = 'Issue with build for {} ({})'.format(self.api.get_revision_id(self.diff_id), self.diff_id)
- self.comments.append(
- 'Pre-merge checks is in beta report issue.
'
- 'Please join beta or '
- 'enable it for your project'.format(
- urllib.parse.quote(title)))
- with open(os.path.join(self.results_dir, 'summary.html'), 'w') as f:
- f.write('')
- f.write('Build result for diff {0} {1} at {2}
'.format(
- self.revision_id, self.diff_id, self.name))
- if self.failure_messages and len(self.failure_messages) > 0:
- for s in self.failure_messages.split('\n'):
- f.write('{}
'.format(s))
- f.write('' + '
'.join(self.comments) + '
')
- f.write('')
- self.api.add_artifact(self.ph_id, 'summary.html', 'summary ' + self.name, self.results_url)
-
- def add_clang_format(self):
- """Populates results from diff produced by clang format."""
- if self.clang_format_patch is None:
- return
- present = os.path.exists(
- os.path.join(self.results_dir, self.clang_format_patch))
- if not present:
- print('clang-format result {} is not found'.format(self.clang_format_patch))
- self.comments.append(section_title('clang-format', False, False))
- return
- p = os.path.join(self.results_dir, self.clang_format_patch)
- if os.stat(p).st_size != 0:
- self.api.add_artifact(self.ph_id, self.clang_format_patch, 'clang-format ' + self.name, self.results_url)
- diffs = _parse_patch(open(p, 'r'))
- success = len(diffs) == 0
- for d in diffs:
- lines = d['diff'].splitlines(keepends=True)
- m = 10 # max number of lines to report.
- description = 'please reformat the code\n```\n'
- n = len(lines)
- cut = n > m + 1
- if cut:
- lines = lines[:m]
- description += ''.join(lines) + '\n```'
- if cut:
- description += '\n{} diff lines are omitted. See [full diff]({}/{}).'.format(
- n - m,
- self.results_url,
- self.clang_format_patch)
- self.add_lint({
- 'name': 'clang-format',
- 'severity': 'autofix',
- 'code': 'clang-format',
- 'path': d['filename'],
- 'line': d['line'],
- 'char': 1,
- 'description': description,
- })
- comment = section_title('clang-format', success, present)
- if not success:
- comment += 'Please format your changes with clang-format by running `git-clang-format HEAD^` or applying ' \
- 'this patch.'.format(os.path.basename(self.clang_format_patch))
- self.comments.append(comment)
- self.success = success and self.success
-
- def add_clang_tidy(self):
- if self.clang_tidy_result is None:
- return
- # Typical message looks like
- # [..]/clang/include/clang/AST/DeclCXX.h:3058:20: error: no member named 'LifetimeExtendedTemporary' in 'clang::Decl' [clang-diagnostic-error]
- pattern = '^{}/([^:]*):(\\d+):(\\d+): (.*): (.*)'.format(self.workspace)
- errors_count = 0
- warn_count = 0
- inline_comments = 0
- present = os.path.exists(
- os.path.join(self.results_dir, self.clang_tidy_result))
- if not present:
- print('clang-tidy result {} is not found'.format(self.clang_tidy_result))
- self.comments.append(section_title('clang-tidy', False, False))
- return
- present = (self.clang_tidy_ignore is not None) and os.path.exists(self.clang_tidy_ignore)
- if not present:
- print('clang-tidy ignore file {} is not found'.format(self.clang_tidy_ignore))
- self.comments.append(section_title('clang-tidy', False, False))
- return
- p = os.path.join(self.results_dir, self.clang_tidy_result)
- add_artifact = False
- ignore = pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern,
- open(self.clang_tidy_ignore, 'r').readlines())
- for line in open(p, 'r'):
- line = line.strip()
- if len(line) == 0 or line == 'No relevant changes found.':
- continue
- add_artifact = True
- match = re.search(pattern, line)
- if match:
- file_name = match.group(1)
- line_pos = match.group(2)
- char_pos = match.group(3)
- severity = match.group(4)
- text = match.group(5)
- text += '\n[[{} | not useful]] '.format(
- 'https://github.com/google/llvm-premerge-checks/blob/master/docs/clang_tidy.md#warning-is-not'
- '-useful')
- if severity in ['warning', 'error']:
- if severity == 'warning':
- warn_count += 1
- if severity == 'error':
- errors_count += 1
- if ignore.match_file(file_name):
- print('{} is ignored by pattern and no comment will be added'.format(file_name))
- else:
- inline_comments += 1
- self.add_lint({
- 'name': 'clang-tidy',
- 'severity': 'warning',
- 'code': 'clang-tidy',
- 'path': file_name,
- 'line': int(line_pos),
- 'char': int(char_pos),
- 'description': '{}: {}'.format(severity, text),
- })
- if add_artifact:
- self.api.add_artifact(self.ph_id, self.clang_tidy_result, 'clang-tidy ' + self.name, self.results_url)
- success = errors_count + warn_count == 0
- comment = section_title('clang-tidy', success, present)
- if not success:
- comment += 'clang-tidy found {} errors and {} warnings. ' \
- '{} of them are added as review comments why?.'.format(
- self.clang_tidy_result, errors_count, warn_count, inline_comments,
- 'https://github.com/google/llvm-premerge-checks/blob/master/docs/clang_tidy.md#review-comments')
-
- self.comments.append(comment)
- self.success = success and self.success
-
- def add_test_results(self):
- """Populates results from build test results XML.
-
- Only reporting failed tests as the full test suite is too large to upload.
- """
-
- success = True
- present = (self.test_result_file is not None) and os.path.exists(
- os.path.join(self.results_dir, self.test_result_file))
- if not present:
- print('Warning: Could not find test results file: {}'.format(self.test_result_file))
- self.comments.append(section_title('Unit tests', False, present))
- return
-
- root_node = etree.parse(os.path.join(self.results_dir, self.test_result_file))
- for test_case in root_node.xpath('//testcase'):
- test_result = _test_case_status(test_case)
- self.test_stats[test_result] += 1
-
- if test_result == 'fail':
- success = False
- failure = test_case.find('failure')
- test_result = {
- 'name': test_case.attrib['name'],
- 'namespace': test_case.attrib['classname'],
- 'result': test_result,
- 'duration': float(test_case.attrib['time']),
- 'details': failure.text
- }
- self.unit.append(test_result)
-
- comment = section_title('Unit tests', success, True)
- comment += '{} tests passed, {} failed and {} were skipped.
'.format(
- self.test_stats['pass'],
- self.test_stats['fail'],
- self.test_stats['skip'],
- )
- if not success:
- comment += 'Failures:
'
- for test_case in self.unit:
- if test_case['result'] == 'fail':
- comment += '{}/{}
'.format(test_case['namespace'], test_case['name'])
- self.comments.append(comment)
- self.success = success and self.success
-
- def add_links_to_artifacts(self):
- """Comment on a diff, read text from file."""
- file_links = []
- for f in os.listdir(self.results_dir):
- if f == 'summary.html':
- continue
- if f == 'console-log.txt':
- self.api.add_artifact(self.ph_id, f, 'build log ' + self.name, self.results_url)
- p = os.path.join(self.results_dir, f)
- if not os.path.isfile(p):
- continue
- if os.stat(p).st_size == 0:
- continue
- file_links.append('{0}'.format(f))
- if len(file_links) > 0:
- self.comments.append('Build artifacts:
' + '
'.join(file_links))
-
-
-def _test_case_status(test_case) -> str:
- """Get the status of a test case based on an etree node."""
- if test_case.find('failure') is not None:
- return 'fail'
- if test_case.find('skipped') is not None:
- return 'skip'
- return 'pass'
-
-
-def section_title(title: str, ok: bool, present: bool) -> str:
- result = 'unknown'
- c = ''
- if present:
- c = 'success' if ok else 'failure'
- result = 'pass' if ok else 'fail'
- return '{} {}. '.format(title, c, result)
-
-
def _try_call(call):
"""Tries to call function several times retrying on socked.timeout."""
c = 0
@@ -536,43 +199,3 @@ def _try_call(call):
print('Connection to Pharicator failed, retrying: {}'.format(e))
time.sleep(c * 10)
break
-
-
-def main():
- parser = argparse.ArgumentParser(
- description='Write build status back to Phabricator.')
- parser.add_argument('ph_id', type=str)
- parser.add_argument('diff_id', type=str)
- parser.add_argument('--test-result-file', type=str, dest='test_result_file', default='test-results.xml')
- parser.add_argument('--conduit-token', type=str, dest='conduit_token', required=True)
- parser.add_argument('--host', type=str, dest='host', default="https://reviews.llvm.org/api/",
- help="full URL to API with trailing slash, e.g. https://reviews.llvm.org/api/")
- parser.add_argument('--dryrun', action='store_true',
- help="output results to the console, do not report back to the server")
- parser.add_argument('--buildresult', type=str, default=None, choices=['SUCCESS', 'UNSTABLE', 'FAILURE', 'null'])
- parser.add_argument('--clang-format-patch', type=str, default=None,
- dest='clang_format_patch',
- help="path to diff produced by git-clang-format, relative to results-dir")
- parser.add_argument('--clang-tidy-result', type=str, default=None,
- dest='clang_tidy_result',
- help="path to diff produced by git-clang-tidy, relative to results-dir")
- parser.add_argument('--clang-tidy-ignore', type=str, default=None,
- dest='clang_tidy_ignore',
- help="path to file with patters to exclude commenting on for clang-tidy findings")
- parser.add_argument('--results-dir', type=str, default=None, required=True,
- dest='results_dir',
- help="directory of all build artifacts")
- parser.add_argument('--results-url', type=str, default=None,
- dest='results_url',
- help="public URL to access results directory")
- parser.add_argument('--workspace', type=str, required=True, help="path to workspace")
- parser.add_argument('--failures', type=str, default=None, help="optional failure messages separated by newline")
- parser.add_argument('--name', type=str, default='', help="optional name of the build bot")
- args = parser.parse_args()
-
- reporter = BuildReport(args)
- reporter.final_report()
-
-
-if __name__ == '__main__':
- main()
diff --git a/scripts/run_buildkite.ps1 b/scripts/run_buildkite.ps1
deleted file mode 100644
index 6e97870..0000000
--- a/scripts/run_buildkite.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-. ${PSScriptRoot}\common.ps1
-
-Write-Output "--- CMake"
-& "${PSScriptRoot}\run_cmake.ps1"
-
-Write-Output "--- ninja all"
-& "${PSScriptRoot}\run_ninja.ps1" all
-
-Write-Output "--- ninja check-all"
-& "${PSScriptRoot}\run_ninja.ps1" check-all
-
-Write-Output "--- done"
\ No newline at end of file
diff --git a/scripts/run_buildkite.sh b/scripts/run_buildkite.sh
deleted file mode 100755
index cb3454f..0000000
--- a/scripts/run_buildkite.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -eux
-
-#folder where this script is stored.
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-
-# dirty workarounds to reuse old scripts...
-export WORKSPACE=`pwd`
-export TARGET_DIR=/tmp
-
-# create a clean build folder
-BUILD_DIR=${WORKSPACE}/build
-rm -rf ${BUILD_DIR} || true
-mkdir -p ${BUILD_DIR}
-
-echo "--- CMake"
-${DIR}/run_cmake.sh
-
-echo "--- ninja all"
-${DIR}/run_ninja.sh all
-
-echo "--- ninja check-all"
-${DIR}/run_ninja.sh check-all
-
-echo "--- done"
\ No newline at end of file
diff --git a/scripts/run_cmake.ps1 b/scripts/run_cmake.ps1
deleted file mode 100644
index 3a88cb4..0000000
--- a/scripts/run_cmake.ps1
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-param (
- [Parameter(Mandatory=$false)][string]$projects="default"
-)
-
-. ${PSScriptRoot}\common.ps1
-
-# set LLVM_ENABLE_PROJECTS to default value
-# if -DetectProjects is set the projects are detected based on the files
-# that were modified in the working copy
-if ($projects -eq "default") {
- # These are the default projects for windows
- $LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libc;lld;mlir;libcxxabi"
-} elseif ($projects -eq "detect") {
- $LLVM_ENABLE_PROJECTS = (git diff HEAD~1 | python ${PSScriptRoot}\choose_projects.py . ) | Out-String
- $LLVM_ENABLE_PROJECTS = $LLVM_ENABLE_PROJECTS.replace("`n","").replace("`r","")
- if ($LLVM_ENABLE_PROJECTS -eq "") {
- Write-Error "Error detecting the affected projects."
- exit 1
- }
-} else {
- $LLVM_ENABLE_PROJECTS=$projects
-}
-
-Write-Output "Setting LLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS}"
-
-# Delete and re-create build folder
-Remove-Item build -Recurse -ErrorAction Ignore
-New-Item -ItemType Directory -Force -Path build | Out-Null
-Push-Location build
-
-# load Vistual Studio environment variables
-Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
-
-# Make sure we're using the Vistual Studio compiler and linker
-$env:CC="cl"
-$env:CXX="cl"
-$env:LD="link"
-
-# call CMake
-$ErrorActionPreference="Continue"
-Invoke-Call -ScriptBlock {
- cmake ..\llvm -G Ninja -DCMAKE_BUILD_TYPE=Release `
- -D LLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS}" `
- -D LLVM_ENABLE_ASSERTIONS=ON `
- -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml" `
- -D LLVM_ENABLE_DIA_SDK=OFF
-}
-
-# LLVM_ENABLE_DIA_SDK=OFF is a workaround to make the tests pass.
-# see https://bugs.llvm.org/show_bug.cgi?id=44151
-
-Pop-Location
\ No newline at end of file
diff --git a/scripts/run_cmake.sh b/scripts/run_cmake.sh
deleted file mode 100755
index fa5f17c..0000000
--- a/scripts/run_cmake.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-set -eux
-
-# Runs Cmake.
-# Inputs: CCACHE_DIR, WORKSPACE, TARGET_DIR; $WORKSPACE/build must exist.
-# Outputs: $TARGET_DIR/CMakeCache.txt, $WORKSPACE/compile_commands.json (symlink).
-
-echo "Running CMake... ======================================"
-export CC=clang
-export CXX=clang++
-export LD=LLD
-
-cd "$WORKSPACE"/build
-set +e
-cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_LLD=ON \
- -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;flang" \
- -D LLVM_CCACHE_BUILD=ON -D LLVM_CCACHE_DIR="${CCACHE_DIR}" -D LLVM_CCACHE_MAXSIZE=20G \
- -D LLVM_ENABLE_ASSERTIONS=ON -DCMAKE_CXX_FLAGS=-gmlt \
- -DLLVM_LIT_ARGS="-v --xunit-xml-output ${WORKSPACE}/build/test-results.xml"
-RETURN_CODE="${PIPESTATUS[0]}"
-set -e
-
-rm -f "$WORKSPACE/compile_commands.json"
-ln -s "$WORKSPACE"/build/compile_commands.json "$WORKSPACE"
-cp CMakeCache.txt ${TARGET_DIR}
-
-echo "CMake completed ======================================"
-exit "${RETURN_CODE}"
diff --git a/scripts/run_ninja.ps1 b/scripts/run_ninja.ps1
deleted file mode 100644
index ddd0659..0000000
--- a/scripts/run_ninja.ps1
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-param(
- [Parameter(Mandatory=$true)][string]$target
-)
-
-. ${PSScriptRoot}\common.ps1
-
-# cd into build folder
-Push-Location build
-
-# load Visual Studio environment variables
-Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
-
-# call ninja
-$PSDefaultParameterValues['*:ErrorAction']='Continue'
-Invoke-Call -ScriptBlock {ninja $target}
-
-Pop-Location
diff --git a/scripts/run_ninja.sh b/scripts/run_ninja.sh
deleted file mode 100755
index 07eee8f..0000000
--- a/scripts/run_ninja.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# Copyright 2019 Google LLC
-#
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://llvm.org/LICENSE.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-set -eu
-
-# Runs ninja
-# Inputs: TARGET_DIR, WORKSPACE.
-# Outputs: $TARGET_DIR/test_results.xml
-
-CMD=$1
-echo "Running ninja ${CMD}... ====================================="
-
-ulimit -n 8192
-cd "${WORKSPACE}/build"
-
-set +e
-ninja ${CMD}
-RETURN_CODE="$?"
-set -e
-
-echo "ninja ${CMD} completed ======================================"
-if test -f "test-results.xml" ; then
- echo "copying test_results.xml to ${TARGET_DIR}"
- # wait for file?
- sleep 10s
- du "test-results.xml"
- cp test-results.xml "${TARGET_DIR}"
- sleep 10s
-fi
-
-exit ${RETURN_CODE}
\ No newline at end of file
diff --git a/scripts/windows_agent_start_jenkins.ps1 b/scripts/windows_agent_start_jenkins.ps1
deleted file mode 100644
index 69b4e90..0000000
--- a/scripts/windows_agent_start_jenkins.ps1
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2019 Google LLC
-
-# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-
-# https://llvm.org/LICENSE.txt
-
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Pull and start the Docker container for a Windows agent.
-# To setup a Windows agent see docs/playbooks.md
-
-param(
- [string]$version = "latest",
- [switch]$testing = $false
-)
-
-$NAME="agent-windows-jenkins"
-$IMAGE="gcr.io/llvm-premerge-checks/${NAME}:${version}"
-
-Write-Output "Authenticating docker..."
-Write-Output "y`n" | gcloud auth configure-docker
-
-Write-Output "Pulling new image..."
-docker pull ${IMAGE}
-
-Write-Output "Stopping old container..."
-docker stop ${NAME}
-docker rm ${NAME}
-
-Write-Output "Starting container..."
-if (${testing}) {
- docker run -it `
- -v D:\:C:\ws `
- -v C:\credentials:C:\credentials `
- -e PARENT_HOSTNAME=$env:computername `
- --restart unless-stopped `
- --name ${NAME} `
- ${IMAGE} powershell
-} else {
- docker run -d `
- -v D:\:C:\ws `
- -v C:\credentials:C:\credentials `
- -e PARENT_HOSTNAME=$env:computername `
- --restart unless-stopped `
- --name ${NAME} `
- ${IMAGE}
-}