1
0
Fork 0

updated docs on windows dev, new setting to skip generated steps

This commit is contained in:
Mikhail Goncharov 2021-03-19 09:22:21 +01:00
parent 67f8efa322
commit f53c519843
3 changed files with 25 additions and 11 deletions

View file

@ -94,11 +94,10 @@ If you want to build/update/test docker container for Windows, you need to do th
**Note**: There is an existing *windows-development* machine that you can resume and use for development. Please stop it after use. **Note**: There is an existing *windows-development* machine that you can resume and use for development. Please stop it after use.
Here are the instructions to set up such a machine on GCP. To setup new machine in GCP:
1. Pick a GCP Windows image with Desktop Support. 1. Pick a GCP Windows image with Desktop Support.
* pick a "persistent SSD" as boot Disk. This is much faster * pick a "persistent SSD" as boot Disk. This is much faster.
* (optionally) add a "local scratch SSD" and use it as you workspace. This will make builds faster, but you **will not be able to stop** this instance and will have to kill and re-create it again.
* make sure that you give enough permissions in "Identity and API access" to be able to e.g. push new docker images to GCR. * make sure that you give enough permissions in "Identity and API access" to be able to e.g. push new docker images to GCR.
1. Format the local SSD partition and use it as workspace. 1. Format the local SSD partition and use it as workspace.
@ -113,6 +112,11 @@ Here are the instructions to set up such a machine on GCP.
git config --global user.name <your name> git config --global user.name <your name>
git config --global user.email <your email> git config --global user.email <your email>
``` ```
1. Clone premerge checks sources:
```powershell
cd c:\
git clone https://github.com/google/llvm-premerge-checks
```
1. Install [Docker Enterprise](https://docs.docker.com/ee/docker-ee/windows/docker-ee/) and reboot: 1. Install [Docker Enterprise](https://docs.docker.com/ee/docker-ee/windows/docker-ee/) and reboot:
```powershell ```powershell
Install-Module DockerMsftProvider -Force Install-Module DockerMsftProvider -Force
@ -125,12 +129,19 @@ Here are the instructions to set up such a machine on GCP.
gcloud components install docker-credential-gcr gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker docker-credential-gcr configure-docker
``` ```
1. To build and run the current agent run: 1. To build and run a dockerfile:
```powershell
cd llvm-premerge-checks\containers
.\build_deploy.ps1 agent-windows-buildkite
1. To deploy container:
```powershell ```powershell
cd c:\
git clone https://github.com/google/llvm-premerge-checks
cd llvm-premerge-checks\containers cd llvm-premerge-checks\containers
.\build_deploy.ps1 agent-windows-buildkite .\build_deploy.ps1 agent-windows-buildkite
```
Test this newly uploaded image:
```powershell
c:\llvm-premerge-check\scripts\windows_agent_start_buildkite.ps1 c:\llvm-premerge-check\scripts\windows_agent_start_buildkite.ps1
``` ```
@ -171,6 +182,7 @@ Most commonly used are:
- `ph_log_level` ("DEBUG", "INFO", "WARNING" (default) or "ERROR"): log level for build scripts. - `ph_log_level` ("DEBUG", "INFO", "WARNING" (default) or "ERROR"): log level for build scripts.
- `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_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. - `ph_skip_linux`, `ph_skip_windows` (if set to any value): skip build on this OS.
- `ph_skip_generated`: don't run custom steps generated from within llvm-project.
## Update HTTP auth credentials ## Update HTTP auth credentials

View file

@ -39,8 +39,9 @@ if __name__ == '__main__':
steps.extend(generic_windows( steps.extend(generic_windows(
os.getenv('ph_projects', 'clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;polly'))) os.getenv('ph_projects', 'clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;polly')))
for gen in steps_generators: if os.getenv('ph_skip_generated') is None:
steps.extend(from_shell_output(gen)) for gen in steps_generators:
steps.extend(from_shell_output(gen))
notify = [] notify = []
for e in notify_emails: for e in notify_emails:

View file

@ -68,8 +68,9 @@ if __name__ == '__main__':
if len(windows_projects) > 0: if len(windows_projects) > 0:
steps.extend(generic_windows(';'.join(sorted(windows_projects)))) steps.extend(generic_windows(';'.join(sorted(windows_projects))))
# Add custom checks. # Add custom checks.
for gen in steps_generators: if os.getenv('ph_skip_generated') is None:
steps.extend(from_shell_output(gen)) for gen in steps_generators:
steps.extend(from_shell_output(gen))
if phid is None: if phid is None:
logging.warning('ph_target_phid is not specified. Skipping "Report" step') logging.warning('ph_target_phid is not specified. Skipping "Report" step')