Skip to content

Commit

Permalink
Merge origin/main (#4005) (#4078)
Browse files Browse the repository at this point in the history
b/360216121

Merge origin/main periodically

---------

Co-authored-by: Madhura Jayaraman <[email protected]>
Co-authored-by: MSoliankoLuxoft
<[email protected]>
Co-authored-by: Hao <[email protected]>
Co-authored-by: Jelle Foks <[email protected]>
Co-authored-by: Oscar Vestlie <[email protected]>
Co-authored-by: Yijia Zhang
<[email protected]>
Co-authored-by: Kaido Kert <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: xiaomings <[email protected]>
Co-authored-by: iuriionishchenko
<[email protected]>

---------

Co-authored-by: Madhura Jayaraman <[email protected]>
Co-authored-by: MSoliankoLuxoft <[email protected]>
Co-authored-by: Hao <[email protected]>
Co-authored-by: Jelle Foks <[email protected]>
Co-authored-by: Oscar Vestlie <[email protected]>
Co-authored-by: Yijia Zhang <[email protected]>
Co-authored-by: Kaido Kert <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: xiaomings <[email protected]>
Co-authored-by: iuriionishchenko <[email protected]>
Co-authored-by: aee <[email protected]>
Co-authored-by: Yavor Goulishev <[email protected]>
Co-authored-by: Andrew Savage <[email protected]>
Co-authored-by: Ying Yu <[email protected]>
Co-authored-by: Drew Thomas <[email protected]>
Co-authored-by: Bo-Rong Chen <[email protected]>
Co-authored-by: Tyler Holcombe <[email protected]>
Co-authored-by: Holden Warriner <[email protected]>
  • Loading branch information
20 people committed Aug 30, 2024
1 parent c2ae994 commit 708c7ab
Show file tree
Hide file tree
Showing 85 changed files with 1,009 additions and 71,698 deletions.
41 changes: 27 additions & 14 deletions .github/actions/check_artifact_size/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,27 @@ runs:
const latestRun = workflowRuns.data.workflow_runs[0].id;
// Get the artifact uploaded on the latest successful workflow run on the main branch.
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: latestRun
});
let allArtifacts = [];
let page = 1;
let hasNextPage = true;
while (hasNextPage) {
const response = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: latestRun,
page: page
});
allArtifacts = allArtifacts.concat(response.data.artifacts);
if (response.data.artifacts.length === 0) {
hasNextPage = false;
} else {
page++;
}
}
const matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
const matchArtifacts = allArtifacts.filter((artifact) => {
return artifact.name == '${{ inputs.name }}';
});
Expand Down Expand Up @@ -89,16 +103,15 @@ runs:
for (let file in fileSizeThresholds) {
console.log(`Checking file size of ${file}.`);
const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', file);
const fileName = file.split('/').pop();
const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', fileName);
if (!fs.existsSync(downloadFilePath)) {
console.error(`File ${file} was not uploaded to the main branch.`);
continue;
core.setFailed(`File ${file} was not uploaded to the main branch.`);
}
const filePath = path.join(process.env.GITHUB_WORKSPACE, '${{ inputs.path }}', file);
if (!fs.existsSync(filePath)) {
console.error(`File ${filePath} was not created in the current workflow run.`);
continue;
core.setFailed(`File ${file} was not created in the current workflow run.`);
}
const oldStats = fs.statSync(downloadFilePath);
Expand All @@ -109,14 +122,14 @@ runs:
console.log(`Latest uploaded artifact size on the main branch is ${oldSize / 1024}kB, new artifact size generated in this PR is ${newSize / 1024}kB.`);
const deltaSize = newSize - oldSize;
const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(4);
const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(1);
if (deltaSize < 0) {
console.log(`Artifact size is decreased by ${Math.abs(deltaSize)} (${deltaThreshold}%).`);
} else {
console.log(`Artifact size is increased by ${deltaSize} (${deltaThreshold}%).`);
if (deltaThreshold > fileSizeThresholds[file]) {
const threshold = (fileSizeThresholds[file] * 100).toFixed(4);
const threshold = (fileSizeThresholds[file] * 100).toFixed(1);
if (deltaThreshold > threshold) {
console.error(`Artifact size increase exceeds threshold ${threshold}%.`);
core.setOutput("addLabel", true);
}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ jobs:
uses: ./.github/actions/build
- name: 'Check Artifact Size'
uses: ./.github/actions/check_artifact_size
if: ${{ inputs.artifact_size_increase_thresholds }}
continue-on-error: true # Ignore this step if check artifact size failed.
if: ${{ false }} # ${{ inputs.artifact_size_increase_thresholds }}
with:
workflow: ${{ github.workflow }}
name: ${{ matrix.platform }}-${{ matrix.config }}
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ repos:
entry: python ./download_resources.py
language: python
stages: [post-checkout]
additional_dependencies: [certifi]
always_run: true
- id: test-download-from-gcs-helper
name: test download from gcs helper
Expand All @@ -174,6 +175,7 @@ repos:
pass_filenames: false
always_run: true
stages: [push]
additional_dependencies: [certifi]
args: [-m, unittest, cobalt/tools/download_from_gcs_test.py]
- id: test-python3-compatibility
name: Test Python 3 Compatibility
Expand Down
7 changes: 3 additions & 4 deletions BUILD_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
| Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Apush+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Apush+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Stub | [![stub](https://github.com/youtube/cobalt/actions/workflows/stub.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub.yaml?query=event%3Apush+branch%3Amain) | [![stub_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![stub_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![stub_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Apush+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Apush+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Xbox One | - | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Python | [![python](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml?query=event%3Apush+branch%3Amain) | [![python_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Java | [![java](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml?query=event%3Apush+branch%3Amain) | [![java_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |

Expand All @@ -23,8 +23,7 @@
| Evergreen | [![evergreen](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml?query=event%3Aschedule+branch%3Amain) | [![evergreen_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![evergreen_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![evergreen_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Aschedule+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Aschedule+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Aschedule+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Aschedule+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Aschedule+branch%3A24.lts.1%2B) | | |
| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |


# Legacy releases
Expand Down
Loading

0 comments on commit 708c7ab

Please sign in to comment.