Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce repository variables to control ODT execution. #381

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3f695bd
Cleanup unused headers in evergreen_info. (#313)
y4vor Mar 25, 2023
ecd28fd
sideboard's first commit (#225)
sideb0ard Apr 3, 2023
6e374b9
Fix webdriver links. (#315)
jellefoks Apr 4, 2023
b6fa5ec
nyardi: commit one (#319)
niranjanyardi Apr 5, 2023
f4f525d
A change is in the air... (#321)
gbournou Apr 6, 2023
ca2183d
[media] Refine comment of media.h (#320)
xiaomings Apr 6, 2023
be59533
yijiazhang's first commit (#331)
yjzhang111 Apr 11, 2023
3d89c68
Add workflow step that creates a unit test report (#335)
oxve Apr 13, 2023
7112a8f
Create workflow_trigger.yaml
isarkis Apr 14, 2023
658b247
Update workflow_trigger.yaml
isarkis Apr 14, 2023
c41c32a
Tune GitHub workflow concurrency (#343)
isarkis Apr 15, 2023
00b4697
Update evergreen.yaml
isarkis Apr 17, 2023
50df07a
Update raspi-2.yaml
isarkis Apr 17, 2023
8ab4362
Fix Python 3.11.2 installer bug in Docker Windows
isarkis Apr 18, 2023
30b354d
Test Copybara (#345)
andrewsavage1 Apr 18, 2023
ae30871
Test Copybara (#347)
andrewsavage1 Apr 18, 2023
740d5ab
Test Copybara double workflow (#348)
andrewsavage1 Apr 18, 2023
af6aa43
Test copybara references (#349)
andrewsavage1 Apr 18, 2023
9c2a79a
Concurrency fix for forked PRs. (#358)
isarkis Apr 19, 2023
7d41482
Update starboard_configuration.py
isarkis Apr 19, 2023
59bce71
Update main.yaml
isarkis Apr 19, 2023
4310e72
Update main.yaml
isarkis Apr 19, 2023
43a74d3
Test change isarkis
isarkis Apr 19, 2023
c5a9dae
Disable Raspi-2 skia to test the concurrency stuff (#363)
kaidokert Apr 19, 2023
ea5ef56
Cure it all (#366)
isarkis Apr 19, 2023
9fc153e
Update .gitignore
isarkis Apr 19, 2023
861344d
Add label based cherry pick workflow (#370)
andrewsavage1 Apr 20, 2023
3a5b942
Introduce repository variables to control ODT execution.
isarkis Apr 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/config/android-arm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
2 changes: 1 addition & 1 deletion .github/config/android-arm64.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
2 changes: 1 addition & 1 deletion .github/config/android-x86.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
7 changes: 1 addition & 6 deletions .github/config/raspi-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"on_device_test": {
"enabled": true,
"tests": [
"0",
"1",
"2",
"3",
"4",
"5"
"0"
]
},
"platforms": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main
- feature/*
schedule:
- cron: '0 4 * * *'
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/label-cherry-pick.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Label Cherry Pick

on:
pull_request_target:
types:
- labeled
- closed

jobs:
prepare_branch_list:
runs-on: ubuntu-latest
outputs:
target_branch: ${{ steps.set-branches.outputs.target_branch }}
steps:
- name: Set Branches
id: set-branches
env:
PR_LABELS: ${{ toJson(github.event.pull_request.labels) }}
EVENT_ACTION: ${{ github.event.action }}
LABEL_NAME: ${{ github.event.label.name }}
BASE_REF: ${{ github.base_ref }}
run: |
if [[ $EVENT_ACTION == 'closed' ]]; then
labels=$(echo "$PR_LABELS" | jq -r '.[].name')
else
labels=$LABEL_NAME
fi

branches=("23.lts.1+" "22.lts.1+" "21.lts.1+", "20.lts.1+" "19.lts.1+" "19.android.1+" "rc_11" "COBALT_9")
filtered_branches=()
for branch in "${branches[@]}"; do
if [[ $branch == $BASE_REF ]]; then
continue
fi

for label in $labels; do
if [[ $label == "cp-$branch" ]]; then
filtered_branches+=("$branch")
fi
done
done

echo "target_branch=$(echo -n "$filtered_branches" | jq -cRs 'split("\n")')" >> $GITHUB_OUTPUT

cherry_pick:
runs-on: ubuntu-latest
needs: prepare_branch_list
if: |
needs.prepare_branch_list.outputs.target_branch != '[]' &&
github.event.pull_request.merged == true &&
github.event.pull_request.merge_commit_sha != null
strategy:
matrix:
target_branch: ${{ fromJson(needs.prepare_branch_list.outputs.target_branch) }}
env:
ACCESS_TOKEN: ${{ secrets.CHERRY_PICK_TOKEN }}
REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
MERGE_COMMIT_SHA: ${{ github.event.pull_request.merge_commit_sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ matrix.target_branch }}
fetch-depth: 0

- name: Setup Git
run: |
git config --global user.name "GitHub Release Automation"
git config --global user.email "[email protected]"

- name: Cherry pick merge commit
run: |
git fetch origin ${{ matrix.target_branch }}
git cherry-pick -x $MERGE_COMMIT_SHA

- name: Create Pull Request
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
with:
token: ${{ secrets.CHERRY_PICK_TOKEN }}
base: ${{ matrix.target_branch }}
branch: "${{ matrix.target_branch }}-${{ github.event.pull_request.number }}"
committer: GitHub Release Automation <[email protected]>
reviewers: ${{ github.event.pull_request.user.login }}
title: "Cherry pick PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
body: |
"Refer to the original PR: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- feature/*

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true

permissions: {}
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
STARBOARD_TOOLCHAINS_DIR: /root/starboard-toolchains

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.number || github.sha }}'
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down Expand Up @@ -230,11 +230,14 @@ jobs:
# Runs on-host integration and unit tests.
on-device-test:
needs: [initialize, build]
if: | # Always run if not a PR or if the PR has on_device label
fromJSON(needs.initialize.outputs.on_device_test).enabled == true && (
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'on_device')
)
# Run if PR has on_device label, and on postsubmit and nightlies if
# repositories variables permit.
if: |
fromJSON(needs.initialize.outputs.on_device_test).enabled == true && ((
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'on_device') )
|| ${{ inputs.nightly == 'true' && vars.RUN_ODT_TESTS_ON_NIGHTLY != 'False' }} ||
${{ github.event_name == 'push' && vars.RUN_ODT_TESTS_ON_POSTSUBMIT != 'False' }} )
runs-on: [self-hosted, linux, X64]
name: ${{ matrix.name }}_on_device_${{ matrix.shard }}
container: ${{ needs.docker-unittest-image.outputs.docker_unittest_tag }}
Expand All @@ -249,6 +252,13 @@ jobs:
env:
COBALT_BOOTLOADER: ${{needs.initialize.outputs.bootloader}}
steps:
- name: Print vars
run: |
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
echo 'NEXT'
echo "${{ env.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
- name: Checkout
uses: actions/checkout@v3
- name: Run Tests (${{ matrix.shard }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
STARBOARD_TOOLCHAINS_DIR: /root/starboard-toolchains

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_badges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ on:
- 'COBALT_9'

concurrency:
group: '${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
group: '${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.pull_request.head.repo.id}}:${{ github.event.pull_request.head.label || github.head_ref || github.sha }}'
cancel-in-progress: true


permissions:
pull-requests: write

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main
- feature/*
schedule:
- cron: '0 4 * * *'
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
nightly:
Expand All @@ -29,11 +29,11 @@ jobs:
with:
platform: raspi-2
nightly: ${{ github.event.inputs.nightly }}
raspi-2-skia:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: raspi-2-skia
nightly: ${{ github.event.inputs.nightly }}
# raspi-2-skia:
# uses: ./.github/workflows/main.yaml
# permissions:
# packages: write
# pull-requests: write
# with:
# platform: raspi-2-skia
# nightly: ${{ github.event.inputs.nightly }}
14 changes: 14 additions & 0 deletions .github/workflows/stub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,22 @@ on:
required: true
type: boolean
default: false
env:
RUN_ODT_TESTS_ON_NIGHTLY: ${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}
RUN_ODT_TESTS_ON_POSTSUBMIT: ${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
echo "${{ env.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
stub:
uses: ./.github/workflows/main.yaml
permissions:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/test-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Test Report'
on:
workflow_run:
# runs after main workflow
workflows:
- evergreen
- linux
# TODO
# - win32
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
with:
name: unit-test-report
path: ${GITHUB_WORKSPACE}/test_results
- name: Create Report
uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226
with:
name: Cobalt Unit Tests
path: ${GITHUB_WORKSPACE}/test_results/**/*.xml
reporter: jest-junit
29 changes: 29 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: repo_vars

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
RUN_ODT_TESTS_ON_NIGHTLY: ${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}
RUN_ODT_TESTS_ON_POSTSUBMIT: ${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
echo "${{ env.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
48 changes: 48 additions & 0 deletions .github/workflows/workflow_trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: workflow_trigger

on:
workflow_dispatch:
inputs:
branch:
type: choice
description: Branch
options:
- '23.lts.1+'
- '22.lts.1+'
- '21.lts.1+'
- '20.lts.1+'
- '19.lts.1+'
- 'rc_11'
- 'COBALT_9'
workflow:
type: choice
description: Workflow name
options:
- 'android'
- 'evergreen'
- 'linux'
- 'raspi'
- 'win32'
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

jobs:
trigger:
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: ${{github.event.branch}}
- name: Trigger Nightly
run: |
set -x
gh workflow run ${{github.event.inputs.workflow}}_${{github.event.inputs.branch}} --ref ${{github.event.inputs.branch}} -f nightly=${{github.event.inputs.nightly}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/venv/*
_certs/
.coverage

1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


group("gn_all") {
testonly = true

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Cobalt [![Build Status](https://img.shields.io/badge/-Build%20Status-blueviolet)](https://github.com/youtube/cobalt/blob/main/BUILD_STATUS.md)

Test change

## Overview

Cobalt is a lightweight application container (i.e. an application runtime, like
Expand Down Expand Up @@ -73,6 +71,8 @@ Chromium, FireFox, and IE:

## Architecture

One more test

The Cobalt Authors forked H5VCC, removed most of the Chromium code -- in
particular WebCore and the Chrome Renderer and Compositor -- and built up from
scratch an implementation of a simplified subset of HTML, the CSS Box Model for
Expand Down
Loading