2020-06-04 08:40:04 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# Copyright 2020 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.
|
|
|
|
|
|
|
|
import os
|
2020-10-02 16:18:33 +02:00
|
|
|
|
2020-10-09 11:05:19 +02:00
|
|
|
from steps import generic_linux, generic_windows, from_shell_output
|
2020-06-04 08:40:04 +02:00
|
|
|
import yaml
|
|
|
|
|
2020-10-09 11:05:19 +02:00
|
|
|
steps_generators = [
|
|
|
|
'${BUILDKITE_BUILD_CHECKOUT_PATH}/libcxx/utils/ci/buildkite-pipeline-snapshot.sh',
|
|
|
|
]
|
|
|
|
|
2020-06-04 08:40:04 +02:00
|
|
|
if __name__ == '__main__':
|
2020-09-29 17:49:38 +02:00
|
|
|
scripts_refspec = os.getenv("ph_scripts_refspec", "master")
|
2020-07-10 17:53:22 +02:00
|
|
|
no_cache = os.getenv('ph_no_cache') is not None
|
|
|
|
filter_output = '--filter-output' if os.getenv('ph_no_filter_output') is None else ''
|
2020-07-09 15:24:27 +02:00
|
|
|
projects = os.getenv('ph_projects', 'clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;openmp;polly')
|
2020-07-30 09:43:09 +02:00
|
|
|
log_level = os.getenv('ph_log_level', 'WARNING')
|
2020-07-22 16:08:52 +02:00
|
|
|
notify_emails = list(filter(None, os.getenv('ph_notify_emails', '').split(',')))
|
2020-06-04 08:40:04 +02:00
|
|
|
steps = []
|
2020-10-02 16:18:33 +02:00
|
|
|
steps.extend(generic_linux(
|
|
|
|
os.getenv('ph_projects', 'clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;openmp;polly'),
|
|
|
|
False))
|
|
|
|
# FIXME: openmp is removed as it constantly fails.
|
2020-10-09 11:05:19 +02:00
|
|
|
|
|
|
|
# TODO: Make this project list be evaluated through "choose_projects"(? as now we define "all" and exclusions in
|
|
|
|
# two placess).
|
2020-10-02 16:18:33 +02:00
|
|
|
steps.extend(generic_windows(
|
|
|
|
os.getenv('ph_projects', 'clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;polly')))
|
2020-10-09 11:05:19 +02:00
|
|
|
|
|
|
|
for gen in steps_generators:
|
|
|
|
steps.extend(from_shell_output(gen))
|
|
|
|
|
2020-07-22 16:08:52 +02:00
|
|
|
notify = []
|
|
|
|
for e in notify_emails:
|
|
|
|
notify.append({'email': e})
|
|
|
|
print(yaml.dump({'steps': steps, 'notify': notify}))
|