Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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/actions/on_device_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ runs:
# Test results (xml and logs) must be in a subfolder in results_dir.
# to be picked up by the test result processor.
mkdir -p "${test_output}/${{ matrix.platform }}"
gsutil -q cp -r "${{ inputs.gcs_results_path }}/" "${test_output}/${{ matrix.platform }}"
gcloud storage cp -r "${{ inputs.gcs_results_path }}/" "${test_output}/${{ matrix.platform }}"

# Check for missing result xml files.
exit_code=0
Expand Down
16 changes: 15 additions & 1 deletion .github/actions/on_host_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ inputs:
num_gtest_shards:
description: "Total number of shards used to run the steps in this file."
required: true
run_id:
description: "The run ID to download artifacts from."
default: ""
github_token:
description: "GitHub token for downloading artifacts from another run."
default: ""
runs:
using: "composite"
steps:
- name: Download Artifacts
- name: Download Artifacts (Current Run)
if: ${{ inputs.run_id == '' }}
uses: actions/download-artifact@v5
with:
name: ${{ inputs.test_artifacts_key }}
- name: Download Artifacts (Previous Run)
if: ${{ inputs.run_id != '' }}
uses: actions/download-artifact@v5
with:
name: ${{ inputs.test_artifacts_key }}
run-id: ${{ inputs.run_id }}
github-token: ${{ inputs.github_token }}
- name: Extract Artifacts
shell: bash
run: |
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/overlay_workspace/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ runs:
# If the golden workspace does not exist or is corrupted (missing .gclient), initialize it.
# This will only happen once per node!
if [ ! -f "$LOWER_DIR/.gclient" ]; then
IS_CACHE_HOT="false"
echo "cache_hit=false" >> $GITHUB_OUTPUT
echo "Golden workspace not found or corrupted. Creating it now. This will take time..."

Expand All @@ -85,9 +86,22 @@ runs:
echo "target_cpu=['x64', 'arm', 'arm64']" >> .gclient
gclient sync -D --no-history
else
IS_CACHE_HOT="true"
echo "cache_hit=true" >> $GITHUB_OUTPUT
fi

echo "Logging workspace cache status to Cloud Logging..."
LOG_PAYLOAD=$(jq -n \
--arg workflow "$GITHUB_WORKFLOW" \
--arg job "$GITHUB_JOB" \
--arg runner "$RUNNER_NAME" \
--arg run_id "$GITHUB_RUN_ID" \
--arg url "https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
--argjson cache_hit "$IS_CACHE_HOT" \
'{workflow: $workflow, job: $job, runner: $runner, run_id: $run_id, url: $url, cache_hit: $cache_hit}')

gcloud logging write github-actions-runners "$LOG_PAYLOAD" --payload-type=json || true

echo "Mounting OverlayFS..."
# Depending on your runner's privilege, use sudo mount or fuse-overlayfs
fuse-overlayfs -o lowerdir="$LOWER_DIR",upperdir="$UPPER_DIR",workdir="$WORK_DIR" "$MERGED_DIR"
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/print_logs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ runs:
env:
WORKFLOW: ${{ github.workflow }}
run: |
gsutil -m cp "gs://${{ steps.gcs-project.outputs.name }}-test-artifacts/${WORKFLOW}/${GITHUB_RUN_NUMBER}/${{matrix.platform}}/symbols/*" \
"${GITHUB_WORKSPACE}/out/${{ matrix.platform }}_${{ matrix.config }}/lib.unstripped/
gcloud storage cp "gs://${{ steps.gcs-project.outputs.name }}-test-artifacts/${WORKFLOW}/${GITHUB_RUN_NUMBER}/${{matrix.platform}}/symbols/*" \
"${GITHUB_WORKSPACE}/out/${{ matrix.platform }}_${{ matrix.config }}/lib.unstripped/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The destination path includes ${{ matrix.config }}, but the source GCS path on line 32 only uses ${{matrix.platform}}. This inconsistency will likely cause the command to fail if the artifacts in the GCS bucket are organized by both platform and configuration, which is the standard practice for build symbols.

shell: bash
- name: Print Logs and Test Summary
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload_test_artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ runs:
"${GITHUB_WORKSPACE}/artifacts/"
fi

gsutil -m cp -r "${GITHUB_WORKSPACE}/artifacts/*" \
gcloud storage cp -r "${GITHUB_WORKSPACE}/artifacts/*" \
"gs://${project_name}-test-artifacts/${WORKFLOW}/${GITHUB_RUN_NUMBER}/${PLATFORM}/"
shell: bash
15 changes: 14 additions & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: android

on:
pull_request:
types: [opened, reopened, synchronize, labeled, ready_for_review]
types: [opened, reopened, synchronize]
branches:
- main
- experimental/*
Expand All @@ -19,6 +19,13 @@ on:
required: true
type: boolean
default: false
label_name:
description: 'Label that triggered this run.'
required: false
type: string
default: ''

permissions: read-all

jobs:
chromium_android-arm64:
Expand All @@ -29,6 +36,7 @@ jobs:
with:
platform: chromium_android-arm64
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
chromium_android-arm:
Expand All @@ -39,6 +47,7 @@ jobs:
with:
platform: chromium_android-arm
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
chromium_android-x86:
Expand All @@ -49,6 +58,7 @@ jobs:
with:
platform: chromium_android-x86
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
# Cobalt specific build configs
Expand All @@ -60,6 +70,7 @@ jobs:
with:
platform: android-arm64
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
android-arm:
Expand All @@ -70,6 +81,7 @@ jobs:
with:
platform: android-arm
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
android-x86:
Expand All @@ -80,5 +92,6 @@ jobs:
with:
platform: android-x86
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
15 changes: 13 additions & 2 deletions .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: evergreen
permissions: read-all

on:
pull_request:
types: [opened, reopened, synchronize, labeled]
types: [opened, reopened, synchronize]
branches:
- main
- experimental/*
Expand All @@ -20,6 +19,13 @@ on:
required: true
type: boolean
default: false
label_name:
description: 'Label that triggered this run.'
required: false
type: string
default: ''

permissions: read-all

jobs:
# evergreen-x64 is Evergreen on linux.
Expand All @@ -31,6 +37,7 @@ jobs:
with:
platform: evergreen-x64
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
run_api_leak_detector: true
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
Expand All @@ -42,6 +49,7 @@ jobs:
with:
platform: evergreen-arm-hardfp-raspi
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
run_api_leak_detector: true
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
Expand All @@ -53,6 +61,7 @@ jobs:
with:
platform: evergreen-arm-hardfp-rdk
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
run_api_leak_detector: true
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
Expand All @@ -64,6 +73,7 @@ jobs:
with:
platform: evergreen-arm-softfp
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
run_api_leak_detector: true
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
Expand All @@ -75,6 +85,7 @@ jobs:
with:
platform: evergreen-arm64
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
run_api_leak_detector: true
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }} @ ${{ github.event.label.name || github.event.pull_request.number || github.sha }} @ ${{ github.event.label.name && github.event.pull_request.number || github.event.action }}
group: ${{ github.workflow }}-${{ github.event_name }} @ ${{ github.event.pull_request.number || github.sha }} @ ${{ github.event.action }}
cancel-in-progress: true

permissions: {}
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: linux

on:
pull_request:
types: [opened, reopened, synchronize, labeled]
types: [opened, reopened, synchronize]
branches:
- main
- experimental/*
Expand All @@ -19,6 +19,13 @@ on:
required: true
type: boolean
default: false
label_name:
description: 'Label that triggered this run.'
required: false
type: string
default: ''

permissions: read-all

jobs:
# This is default Chromium build config
Expand All @@ -30,6 +37,7 @@ jobs:
with:
platform: chromium_linux
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
# This is default Cobalt build config
Expand All @@ -41,6 +49,7 @@ jobs:
with:
platform: linux
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
# This is cobalt on linux using modular build config
Expand All @@ -52,6 +61,7 @@ jobs:
with:
platform: linux-modular
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
# This is content_shell without starboard
Expand All @@ -63,5 +73,6 @@ jobs:
with:
platform: linux-web-tests
nightly: ${{ github.event.inputs.nightly }}
label_name: ${{ github.event.inputs.label_name }}
secrets:
datadog_api_key: ${{ secrets.DD_API_KEY }}
Loading
Loading