From 21087cfb1bcabb6688ccac3a52c7972176a5e90b Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov Date: Thu, 27 Aug 2020 16:18:11 +0200 Subject: [PATCH] add -DLLVM_TARGETS_TO_BUILD=X86 cmake argument --- .editorconfig | 2 ++ docs/playbooks.md | 32 ++++++++++++++++++++++---------- scripts/run_cmake.py | 1 + 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3982f48..792d871 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,8 @@ ij_smart_tabs = false [*.md] max_line_length = 80 ij_visual_guides = 80,100 +indent_size = 2 +tab_width = 2 [{*.pyw,*.py,*.pi}] indent_style = space diff --git a/docs/playbooks.md b/docs/playbooks.md index 842b016..44d1d8f 100644 --- a/docs/playbooks.md +++ b/docs/playbooks.md @@ -1,4 +1,5 @@ - [Playbooks](#playbooks) + * [Testing changes to the build scripts](#testing-changes-to-the-build-scripts) * [deployment to a clean infrastructure](#deployment-to-a-clean-infrastructure) * [creating basic authentication for reverse proxy](#creating-basic-authentication-for-reverse-proxy) * [Creating docker containers on Windows](#creating-docker-containers-on-windows) @@ -7,13 +8,33 @@ + [Jenkins](#jenkins) * [Testing scripts locally](#testing-scripts-locally) * [Custom environment variables](#custom-environment-variables) - * [Testing changes before merging](#testing-changes-before-merging) - [Phabricator integration](#phabricator-integration) * [Herald](#herald) * [Harbormaster](#harbormaster) # Playbooks +## Testing changes to the build scripts + +It's recommended to test even smallest changes before committing them to the `master` branch. + +1. Create a branch with your changes, e.g. "my-feature" and push it to origin. +2. Manually create a buildkite build in the pipeline you are updating and + specify environment variable `scripts_branch="my-feature"` (see also [custom + environment variables](#custom-environment-variables) for other options). + To test "premerge-tests" pipeline pick an existing build and copy parameters + from it, omitting "ph_target_phid", namely: "ph_build_id", + "ph_buildable_diff", "ph_buildable_revision", "ph_initiator_phid" and + "scripts_branch" variables. + **Or** use Buildkite REST API, e.g. to run 'llvm-master-build': + ```shell script + curl -H "Authorization: Bearer MY-API-TOKEN" \ + -X POST "https://api.buildkite.com/v2/organizations/llvm-project/pipelines/llvm-master-build/builds" \ + -d '{"branch": "master", "commit": "HEAD", "env": {"scripts_branch": "my-feature"}}' + ``` +1. Wait for build to complete and maybe attach a link to it to your Pull + Request. + ## deployment to a clean infrastructure General remarks: @@ -190,15 +211,6 @@ Most commonly used are: - `ph_linux_agents`, `ph_windows_agents`: custom JSON constraints on agents. For example you might put one machine to a custom queue if it's errornous and send jobs to it with `ph_windows_agents="{{\"queue\": \"custom\"}}"`. - `ph_skip_linux`, `ph_skip_windows` (if set to any value): skip build on this OS. -## Testing changes before merging - -It's recommended to test even smallest changes before committing them to the `master` branch. - -1. Create a branch with your changes, e.g. "my-feature" and push it to origin. -1. Manually create a buildkite build in the pipeline you are updating and specify environment variable - `scripts_branch="my-feature"` (see also "Custom environment variables" for other options above). To test "premerge-tests" pipeline pick an existing build and copy parameters from it, omitting "ph_target_phid", namely: "ph_build_id", "ph_buildable_diff", "ph_buildable_revision", "ph_initiator_phid" and "scripts_branch" variables. -1. Wait for build to complete and maybe attach a link to it to your PR. - # Phabricator integration The general flow for builds on Phabricator is: diff --git a/scripts/run_cmake.py b/scripts/run_cmake.py index 5375223..f1833f9 100755 --- a/scripts/run_cmake.py +++ b/scripts/run_cmake.py @@ -111,6 +111,7 @@ def _create_args(config: Configuration, llvm_enable_projects: str, use_cache: bo arguments = [ os.path.join('..', 'llvm'), '-D LLVM_ENABLE_PROJECTS="{}"'.format(llvm_enable_projects), + '-D LLVM_TARGETS_TO_BUILD=X86', ] arguments.extend(config.general_cmake_arguments) arguments.extend(config.specific_cmake_arguments)