-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XB1] Add github action to build XB1 on PRs
See bug or youtube/cobalt_sandbox#513 for more context. b/266878119 Change-Id: Ib018dcd5d257c2c68cbb194f9867887ca1a4fdf6
- Loading branch information
Showing
11 changed files
with
216 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"docker_service": "build-xb1", | ||
"__comment" : "TODO: Deploy a runner and change this", | ||
"docker_runner_service": "runner-xb1", | ||
"runner_tag": "xb1", | ||
"platforms": [ | ||
"xb1" | ||
], | ||
"includes": [ | ||
{ | ||
"name":"xb1", | ||
"platform":"xb1", | ||
"target_platform":"xb1", | ||
"extra_gn_arguments": "is_clang=false", | ||
"target_cpu": "target_cpu=\\\"x64\\\"", | ||
"target_os": "target_os=\\\"winuwp\\\"" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: xb1 | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, labeled] | ||
branches: | ||
- main | ||
- feature/* | ||
push: | ||
branches: | ||
- main | ||
- feature/* | ||
schedule: | ||
# GTM timezone. | ||
- cron: '0 4 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
nightly: | ||
description: 'Nightly workflow.' | ||
required: true | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
xb1: | ||
uses: ./.github/workflows/main_win.yaml | ||
permissions: | ||
packages: write | ||
pull-requests: write | ||
with: | ||
platform: xb1 | ||
nightly: ${{ github.event.inputs.nightly }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
.\actions-runner\config.cmd --unattended --replace --url https://github.com/${env:RUNNER_REPO} --token $env:RUNNER_TOKEN --name $env:RUNNER_NAME --work $env:RUNNER_WORKDIR --labels $env:RUNNER_LABELS; | ||
.\actions-runner\run.cmd; | ||
C:\actions-runner\config.cmd --unattended --replace --url https://github.com/${env:RUNNER_REPO} --token $env:RUNNER_TOKEN --name $env:RUNNER_NAME --work $env:RUNNER_WORKDIR --labels $env:RUNNER_LABELS; | ||
C:\actions-runner\run.cmd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# escape=` | ||
|
||
# Copyright 2021 The Cobalt Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# 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. | ||
ARG FROM_IMAGE | ||
FROM ${FROM_IMAGE} | ||
|
||
SHELL ["powershell", "-ExecutionPolicy", "Unrestricted", "-Command", ` | ||
"$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
# Note: Visual Studio is installed as part of cobalt-build-win-base | ||
|
||
# Windows SDK | ||
RUN Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/p/?linkid=2173743 ` | ||
-OutFile C:\win_sdk_installer.exe ; ` | ||
Write-Host 'Installing win_sdk_installer.exe ...' ; ` | ||
C:\win_sdk_installer.exe /ceip off /quiet /features + | Out-Null ; ` | ||
Write-Host 'Install of win_sdk_installer.exe completed. Cleaning up ...' ; ` | ||
Remove-Item -Force -Recurse $env:TEMP\* ; ` | ||
Remove-Item C:\win_sdk_installer.exe | ||
|
||
# MSVC sdk | ||
ARG vs_buildtools_version="15" | ||
ARG windows_11_sdk_version="22000" | ||
RUN Write-Host 'Downloading vs_buildtools.exe' ; ` | ||
Invoke-WebRequest -Uri https://aka.ms/vs/${env:vs_buildtools_version}/release/vs_buildtools.exe ` | ||
-OutFile C:\vs_buildtools.exe ; ` | ||
Write-Host 'Installing vs_buildtools.exe ...' ;` | ||
Start-Process -Wait -FilePath C:\vs_buildtools.exe -ArgumentList "--quiet","--wait","--norestart","--nocache","--installPath","C:\BuildTools","--add","Microsoft.VisualStudio.Component.Windows11SDK.${env:windows_11_sdk_version}","--add","Microsoft.VisualStudio.Component.VC.Redist.14.Latest" ; ` | ||
Write-Host 'Install of vs_buildtools.exe completed. Cleaning up ...' ; ` | ||
Remove-Item C:\vs_buildtools.exe | ||
|
||
|
||
WORKDIR "C:\code" | ||
|
||
CMD python3 cobalt/build/gn.py -p $env:PLATFORM -c $env:CONFIG out/${env:PLATFORM}_${env:CONFIG};` | ||
if ($?) {` | ||
ninja $env:NINJA_FLAGS -C out/${env:PLATFORM}_$env:CONFIG $env:TARGET;` | ||
} |