Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
ci(cua-driver): align distro compatibility with release publication (#2973)
Francesco Bonacci3cafd631db8d
diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.pyindex 84e4c16571..4bdd31b22b 100644--- a/.github/scripts/tests/test_cua_driver_release_wiring.py+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py@@ -198,7 +198,10 @@ class TestCuaDriverReleaseWiring(unittest.TestCase):def test_distro_compat_downloads_release_asset_once_per_run(self) -> None:workflow = self.read(".github/workflows/ci-distro-compat-cua-driver.yml")- self.assertEqual(workflow.count('curl -fsSL "$BINARY_URL"'), 1)+ self.assertEqual(+ workflow.count('"$BINARY_URL" -o cua-driver-release.tar.gz'),+ 1,+ )self.assertIn("actions/upload-artifact@v4", workflow)self.assertIn("actions/download-artifact@v4", workflow)self.assertIn("cua-driver-release-${{ steps.pick.outputs.version }}", workflow)@@ -213,7 +216,14 @@ class TestCuaDriverReleaseWiring(unittest.TestCase):workflow.count(' - ".github/workflows/ci-distro-compat-cua-driver.yml"'),2,)- self.assertIn(' - "cua-driver-rs-v*"', workflow)+ self.assertIn(" release:\n", workflow)+ self.assertIn(" types: [published]", workflow)+ self.assertIn(+ "startsWith(github.event.release.tag_name, 'cua-driver-rs-v')",+ workflow,+ )+ self.assertIn('VERSION="${RELEASE_TAG#cua-driver-rs-v}"', workflow)+ self.assertNotIn(' - "cua-driver-rs-v*"', workflow)self.assertIn(" workflow_dispatch:", workflow)def test_expensive_rust_workflows_do_not_watch_the_entire_tree(self) -> None:@@ -614,11 +624,12 @@ class TestCuaDriverReleaseWiring(unittest.TestCase):self.assertIn(".stdout(Stdio::null())", telemetry)self.assertIn(".stderr(Stdio::null())", telemetry)- def test_released_linux_smoke_waits_for_assets_and_installs_xkbcommon(self) -> None:+ def test_released_linux_smoke_follows_publication_and_installs_xkbcommon(self) -> None:workflow = self.read(".github/workflows/ci-distro-compat-cua-driver.yml")- self.assertIn("for attempt in $(seq 1 90)", workflow)- self.assertIn("release asset was still unavailable after 15 minutes", workflow)+ self.assertIn("--retry 5 --retry-delay 2 --retry-all-errors", workflow)+ self.assertNotIn("for attempt in $(seq 1 90)", workflow)+ self.assertNotIn("release asset was still unavailable after 15 minutes", workflow)self.assertEqual(workflow.count("libxkbcommon0"), 4)self.assertEqual(workflow.count('libxkbcommon"'), 2)diff --git a/.github/workflows/ci-distro-compat-cua-driver.yml b/.github/workflows/ci-distro-compat-cua-driver.ymlindex fbb1e99d18..5b16181738 100644--- a/.github/workflows/ci-distro-compat-cua-driver.yml+++ b/.github/workflows/ci-distro-compat-cua-driver.yml@@ -26,8 +26,8 @@ name: "CI: cua-driver distro-compat matrix"# Trigger workflow changes in PRs and on main so edits to this matrix validate# against the current release. Source changes do not run this workflow because# it downloads a published binary rather than building the proposed commit.-# Release tags always run the matrix against the matching artifact, and-# workflow_dispatch remains available for maintainer-requested validation.+# Published Cua Driver releases run the matrix against their matching artifact,+# and workflow_dispatch remains available for maintainer-requested validation.## Companion to the Rust desktop E2E workflows; it validates released binaries,# not source-built harness behavior.@@ -37,13 +37,15 @@ on:paths:- ".github/workflows/ci-distro-compat-cua-driver.yml"push:- # Path filters do not apply to tag pushes, so every release tag still runs.# Main-branch pushes run only when the matrix itself changes.branches: [main]- tags:- - "cua-driver-rs-v*"paths:- ".github/workflows/ci-distro-compat-cua-driver.yml"+ release:+ # The Cua Driver release train separates immutable tag creation from an+ # explicitly dispatched publication step. Wait for publication so the+ # released-binary matrix never races a draft release.+ types: [published]workflow_dispatch:inputs:version:@@ -61,6 +63,9 @@ jobs:# we use that instead.resolve-version:name: Resolve release version+ if: |+ github.event_name != 'release' ||+ startsWith(github.event.release.tag_name, 'cua-driver-rs-v')runs-on: ubuntu-latestoutputs:version: ${{ steps.pick.outputs.version }}@@ -71,11 +76,12 @@ jobs:env:GH_TOKEN: ${{ github.token }}INPUT_VERSION: ${{ inputs.version }}+ RELEASE_TAG: ${{ github.event.release.tag_name }}run: |if [[ -n "$INPUT_VERSION" ]]; thenVERSION="$INPUT_VERSION"- elif [[ "$GITHUB_REF" == refs/tags/cua-driver-rs-v* ]]; then- VERSION="${GITHUB_REF#refs/tags/cua-driver-rs-v}"+ elif [[ "$GITHUB_EVENT_NAME" == "release" ]]; then+ VERSION="${RELEASE_TAG#cua-driver-rs-v}"else# Fetch the latest release that matches the cua-driver-rs-v* pattern.# The releases are marked prerelease=true so we use /releases instead@@ -104,21 +110,11 @@ jobs:env:BINARY_URL: ${{ steps.pick.outputs.binary_url }}run: |- # The tag and desktop CD workflows start at the same time. Building,- # notarizing, and publishing every platform can take several minutes,- # so a tag-triggered compatibility run must wait for the release asset- # instead of treating the initial 404 as a broken release.- for attempt in $(seq 1 90); do- if curl -fsSL "$BINARY_URL" -o cua-driver-release.tar.gz; then- exit 0- fi- if [[ "$attempt" -eq 90 ]]; then- echo "ERROR: release asset was still unavailable after 15 minutes"- exit 1- fi- echo "Release asset not available yet (attempt ${attempt}/90); retrying in 10s..."- sleep 10- done+ # Release assets are staged before the draft becomes public. Keep a+ # short retry window only for transient GitHub/CDN propagation.+ curl --fail --silent --show-error --location \+ --retry 5 --retry-delay 2 --retry-all-errors \+ "$BINARY_URL" -o cua-driver-release.tar.gz- name: Cache released binary for matrixif: steps.pick.outputs.version != 'none'