Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/arch-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Arch package

on:
merge_group:
pull_request:
paths:
- "scripts/build-linux-arch-package*"
Expand All @@ -11,7 +12,34 @@ permissions:
contents: read

jobs:
# GitHub ignores paths filters in the merge queue, so the queue run applies
# this workflow's pull_request paths to the queued change itself.
scope:
name: Scope
if: github.event_name == 'merge_group'
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
outputs:
run: ${{ steps.queue.outputs.run }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
filter: blob:none
sparse-checkout: |
.github/workflows
scripts/ci
- name: Merge queue scope
id: queue
env:
BASE: ${{ github.event.merge_group.base_sha }}
HEAD: ${{ github.event.merge_group.head_sha }}
run: python3 scripts/ci/merge_queue.py scope --workflow .github/workflows/arch-package.yml --base "$BASE" --head "$HEAD" >> "$GITHUB_OUTPUT"

test:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' }}
name: Arch package versions
runs-on: blacksmith-2vcpu-ubuntu-2404
container: archlinux:base-devel@sha256:68bfc3b0d277b08a99101dc9b94aaa03e5ae70cf1b4fb965c03b2b87b915760d
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -35,6 +36,10 @@ jobs:
uses: dorny/paths-filter@v3
id: filter
with:
# In the merge queue, compare the queued commit with the commit it
# was built on, so only this pull request's changes pick the jobs.
base: ${{ github.event.merge_group.base_sha }}
ref: ${{ github.event.merge_group.head_sha }}
filters: |
rust:
- '.cargo/**'
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/database-profile-reliability.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Database Profile Reliability

on:
merge_group:
workflow_dispatch:
pull_request:
paths:
Expand All @@ -26,7 +27,34 @@ concurrency:
cancel-in-progress: true

jobs:
# GitHub ignores paths filters in the merge queue, so the queue run applies
# this workflow's pull_request paths to the queued change itself.
scope:
name: Scope
if: github.event_name == 'merge_group'
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
outputs:
run: ${{ steps.queue.outputs.run }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
filter: blob:none
sparse-checkout: |
.github/workflows
scripts/ci
- name: Merge queue scope
id: queue
env:
BASE: ${{ github.event.merge_group.base_sha }}
HEAD: ${{ github.event.merge_group.head_sha }}
run: python3 scripts/ci/merge_queue.py scope --workflow .github/workflows/database-profile-reliability.yml --base "$BASE" --head "$HEAD" >> "$GITHUB_OUTPUT"

profile-contract:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' }}
name: Profile, activation, and consent compatibility
runs-on: ubuntu-24.04
timeout-minutes: 10
Expand Down
54 changes: 43 additions & 11 deletions .github/workflows/docker-build-media-server.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Docker Build Media Server"

on:
merge_group:
workflow_dispatch:
inputs:
tag:
Expand Down Expand Up @@ -32,7 +33,34 @@ concurrency:
cancel-in-progress: true

jobs:
# GitHub ignores paths filters in the merge queue, so the queue run applies
# this workflow's pull_request paths to the queued change itself.
scope:
name: Scope
if: github.event_name == 'merge_group'
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
outputs:
run: ${{ steps.queue.outputs.run }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
filter: blob:none
sparse-checkout: |
.github/workflows
scripts/ci
- name: Merge queue scope
id: queue
env:
BASE: ${{ github.event.merge_group.base_sha }}
HEAD: ${{ github.event.merge_group.head_sha }}
run: python3 scripts/ci/merge_queue.py scope --workflow .github/workflows/docker-build-media-server.yml --base "$BASE" --head "$HEAD" >> "$GITHUB_OUTPUT"

audio-metrics:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' }}
name: Audio intelligibility alignment
runs-on: ubuntu-24.04
timeout-minutes: 5
Expand All @@ -51,6 +79,8 @@ jobs:
"$RUNNER_TEMP/audio-metrics/bin/python" scripts/test-audio-intelligibility.py

railway-dockerfile:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' }}
# The Railway media server builds apps/media-server/Dockerfile, whose test
# chain differs from Dockerfile.standalone. Building it here keeps that
# chain from failing unnoticed.
Expand All @@ -67,6 +97,8 @@ jobs:
run: docker build --progress=plain -f apps/media-server/Dockerfile -t cap-media-server:railway-check .

build:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' }}
name: Build Docker Image (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
Expand All @@ -90,7 +122,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
if: (github.event_name != 'pull_request' && github.event_name != 'merge_group')
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -108,16 +140,16 @@ jobs:
context: ./apps/media-server
file: ./apps/media-server/Dockerfile.standalone
platforms: linux/${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
tags: ${{ github.event_name == 'pull_request' && 'cap-media-server:verification' || '' }}
outputs: ${{ github.event_name != 'pull_request' && format('type=image,name=ghcr.io/{0}/cap-media-server,push-by-digest=true', env.REPOSITORY_OWNER) || '' }}
push: ${{ (github.event_name != 'pull_request' && github.event_name != 'merge_group') }}
load: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') }}
tags: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'cap-media-server:verification' || '' }}
outputs: ${{ (github.event_name != 'pull_request' && github.event_name != 'merge_group') && format('type=image,name=ghcr.io/{0}/cap-media-server,push-by-digest=true', env.REPOSITORY_OWNER) || '' }}
cache-from: type=gha,scope=media-server-${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=media-server-${{ matrix.platform }}

- name: Verify recording decode in the production image
env:
MEDIA_IMAGE: ${{ github.event_name == 'pull_request' && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
MEDIA_IMAGE: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
run: |
docker run --rm --network none --entrypoint bun "$MEDIA_IMAGE" test \
src/__tests__/lib/audio-quality-policy.test.ts \
Expand Down Expand Up @@ -176,7 +208,7 @@ jobs:

- name: Verify the server runs without root in the production image
env:
MEDIA_IMAGE: ${{ github.event_name == 'pull_request' && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
MEDIA_IMAGE: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
run: |
test "$(docker run --rm --network none "$MEDIA_IMAGE" id -u)" = 1000
docker volume create media-gpu-cache
Expand All @@ -191,7 +223,7 @@ jobs:

- name: Verify long recording performance in the production image
env:
MEDIA_IMAGE: ${{ github.event_name == 'pull_request' && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
MEDIA_IMAGE: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'cap-media-server:verification' || format('ghcr.io/{0}/cap-media-server@{1}', env.REPOSITORY_OWNER, steps.build.outputs.digest) }}
run: |
docker run --rm --network none --cpus 2 --memory 2g \
-e MEDIA_SERVER_RECORDING_PERFORMANCE_TESTS=1 \
Expand All @@ -205,14 +237,14 @@ jobs:
src/__tests__/lib/drive-resumable-upload.test.ts

- name: Export Digest
if: github.event_name != 'pull_request'
if: (github.event_name != 'pull_request' && github.event_name != 'merge_group')
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"

- name: Upload Digest
if: github.event_name != 'pull_request'
if: (github.event_name != 'pull_request' && github.event_name != 'merge_group')
uses: actions/upload-artifact@v4
with:
name: digests-media-server-${{ matrix.platform }}
Expand All @@ -223,7 +255,7 @@ jobs:
merge:
name: Create Multi-Architecture Manifest
needs: build
if: github.event_name != 'pull_request'
if: (github.event_name != 'pull_request' && github.event_name != 'merge_group')
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/glass-probe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Glass probe (real app)
# fitted to Apple's own glass.

on:
merge_group:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
Expand Down Expand Up @@ -33,10 +34,27 @@ jobs:
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
outputs:
run: ${{ steps.scope.outputs.run }}
run: ${{ steps.queue.outputs.run || steps.scope.outputs.run }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'merge_group'
with:
persist-credentials: false
fetch-depth: 2
filter: blob:none
sparse-checkout: |
.github/workflows
scripts/ci
- name: Merge queue scope
id: queue
if: github.event_name == 'merge_group'
env:
BASE: ${{ github.event.merge_group.base_sha }}
HEAD: ${{ github.event.merge_group.head_sha }}
run: python3 scripts/ci/merge_queue.py scope --workflow .github/workflows/glass-probe.yml --base "$BASE" --head "$HEAD" >> "$GITHUB_OUTPUT"
- name: Scope
id: scope
if: github.event_name != 'merge_group'
env:
GH_TOKEN: ${{ github.token }}
EVENT: ${{ github.event_name }}
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/gpui-app-bench.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: GPUI app benchmark

on:
merge_group:
pull_request:
paths:
- "apps/desktop-gpui/patches/**"
Expand All @@ -26,11 +27,37 @@ permissions:
contents: read

jobs:
# GitHub ignores paths filters in the merge queue, so the queue run applies
# this workflow's pull_request paths to the queued change itself.
scope:
name: Scope
if: github.event_name == 'merge_group'
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
outputs:
run: ${{ steps.queue.outputs.run }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
filter: blob:none
sparse-checkout: |
.github/workflows
scripts/ci
- name: Merge queue scope
id: queue
env:
BASE: ${{ github.event.merge_group.base_sha }}
HEAD: ${{ github.event.merge_group.head_sha }}
run: python3 scripts/ci/merge_queue.py scope --workflow .github/workflows/gpui-app-bench.yml --base "$BASE" --head "$HEAD" >> "$GITHUB_OUTPUT"

editor:
needs: scope
if: ${{ !cancelled() && needs.scope.outputs.run != 'false' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
name: Editor draw benchmark (macOS)
# Benchmarks build GPUI twice and run for up to two hours, so pull requests
# from forks do not start them; maintainers can run them with workflow_dispatch.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: blacksmith-6vcpu-macos-15
timeout-minutes: 150
env:
Expand Down Expand Up @@ -72,7 +99,7 @@ jobs:
shell: bash
env:
BASE_INPUT: ${{ inputs.base }}
PR_BASE: ${{ github.event.pull_request.base.sha }}
PR_BASE: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
run: |
set -euo pipefail
node scripts/sync-desktop-versions.mjs
Expand Down
Loading
Loading