1
0
Fork 0

Merge branch 'master' of ssh://github.com/google/llvm-premerge-checks

This commit is contained in:
Christian Kühnel 2019-12-19 09:08:09 +00:00
commit 4028d1eef2
4 changed files with 60 additions and 0 deletions

View file

@ -9,6 +9,7 @@ The *checks* comprise of these steps:
1. Run Cmake -- see [run_cmake.sh](https://github.com/google/llvm-premerge-checks/blob/master/scripts/run_cmake.sh#L31) for details 1. Run Cmake -- see [run_cmake.sh](https://github.com/google/llvm-premerge-checks/blob/master/scripts/run_cmake.sh#L31) for details
1. Build the binaries -- `ninja all` 1. Build the binaries -- `ninja all`
1. Run the test suite -- `ninja check-all` 1. Run the test suite -- `ninja check-all`
1. Run clang-format and clang-tidy on the diff.
The checks are executed on one platform (Debian Testing on amd64 with the clang-8 tool chain) at the moment. The plan is to add more platforms, in the future. The checks are executed on one platform (Debian Testing on amd64 with the clang-8 tool chain) at the moment. The plan is to add more platforms, in the future.
@ -24,6 +25,8 @@ If you find any problems please raise an [issue on github](https://github.com/go
To sign up for the pre-merge beta testing, please add yourself to the ["pre-merge beta testing" project](https://reviews.llvm.org/project/members/78/) on Phabricator. To sign up for the pre-merge beta testing, please add yourself to the ["pre-merge beta testing" project](https://reviews.llvm.org/project/members/78/) on Phabricator.
The checks are enabled for all changes to `clang-tools-extra/clangd`.
# Requirements # Requirements
To get a patch on Phabricator tested - once you are signed up - the build server must be able to apply the patch to the checked out git repository. If you want to get your patch tested, please make sure that that either: To get a patch on Phabricator tested - once you are signed up - the build server must be able to apply the patch to the checked out git repository. If you want to get your patch tested, please make sure that that either:

View file

@ -3,3 +3,4 @@ GCP_ZONE="us-central1-a"
GCP_CLUSTER="llvm-premerge-checks" GCP_CLUSTER="llvm-premerge-checks"
GCP_PROJECT="llvm-premerge-checks" GCP_PROJECT="llvm-premerge-checks"
GCR_HOSTNAME="gcr.io" GCR_HOSTNAME="gcr.io"
GCS_BUCKET='llvm-premerge-checks'

54
kubernetes/storage_create.sh Executable file
View file

@ -0,0 +1,54 @@
#!/bin/bash
#!/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 up Google Cloud Storage for the build results
set -eux
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ROOT_DIR="$(dirname ${DIR})"
# get config options
source "${ROOT_DIR}/k8s_config"
# create a bucket
gsutil mb --retention 90d gs://${GCS_BUCKET}
# put a dummy file there so we can set the path ACLs
echo "hello world" | gsutil cp - gs://${GCS_BUCKET}/results/hello.txt
# make results folder world-readable, now files are accessable via
# https://storage.googleapis.com/llvm-premerge-checks/results/
gsutil iam ch allUsers:objectViewer gs://${GCS_BUCKET}
gsutil acl ch -u AllUsers:R gs://${GCS_BUCKET}/results/*
AGENT_SERVICE_ACCOUNT="build-agent-results"
KEY_FILE="${AGENT_SERVICE_ACCOUNT}_key.json"
# create service account and key
gcloud iam service-accounts create ${AGENT_SERVICE_ACCOUNT} \
--description "account for build agent to upload build results"
gcloud iam service-accounts keys create ${KEY_FILE} \
--iam-account "${AGENT_SERVICE_ACCOUNT}@${GCP_PROJECT}.iam.gserviceaccount.com"
# upload the key to the kubernetes secret storage
kubectl create secret generic "${AGENT_SERVICE_ACCOUNT}" \
--from-file ${KEY_FILE}
# give write permissions to service account
gsutil acl ch \
-u "${AGENT_SERVICE_ACCOUNT}@${GCP_PROJECT}.iam.gserviceaccount.com":WRITER \
gs://${GCS_BUCKET}

View file

@ -12,6 +12,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
#-------------------------------------------------------------------------------
# create a new windows agent
set -eux set -eux