Skip to content
Closed
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
114 changes: 114 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Android CI

on:
pull_request:
branches: [ main ]
workflow_dispatch:

# Cancel superseded pull_request runs when a newer commit is pushed to the same
# PR. Other events get a per-commit group, so they are never cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
build:
name: Android CI / build
# zizmor: ignore[unpinned-images]
runs-on: ubuntu-24.04
timeout-minutes: 15

steps:
- name: Checkout samples repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: a2ui-samples
persist-credentials: false

- name: Resolve core SDK branch
id: core_ref
env:
HEAD_REF: ${{ github.head_ref }}
run: |
RESOLVED_REF="main"
case "$HEAD_REF" in
test_*)
# Poll up to 80s for the parallel Copybara-Review-a2ui-core export to push test_<OCL>.
for ATTEMPT in $(seq 1 9); do
if git ls-remote --exit-code --heads https://github.com/googlemaps/a2ui.git "refs/heads/$HEAD_REF" >/dev/null 2>&1; then
RESOLVED_REF="$HEAD_REF"
break
fi
if [ "$ATTEMPT" -lt 9 ]; then
echo "Waiting 10s for Copybara to push $HEAD_REF to googlemaps/a2ui (attempt $ATTEMPT/9)..."
sleep 10
fi
done
if [ "$RESOLVED_REF" = "main" ]; then
echo "::warning::Branch $HEAD_REF not found on googlemaps/a2ui after 80s; falling back to main."
fi
;;
esac
echo "Using googlemaps/a2ui ref: $RESOLVED_REF"
echo "ref=$RESOLVED_REF" >> "$GITHUB_OUTPUT"

- name: Checkout core SDK repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: googlemaps/a2ui
ref: ${{ steps.core_ref.outputs.ref }}
path: a2ui
persist-credentials: false

- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
cache-dependency-path: |
a2ui/client/android/GoogleMapsA2UI/**/*.gradle*
a2ui-samples/client/android/**/*.gradle*

- name: Publish core SDK to Maven Local
run: |
chmod +x ./gradlew
./gradlew publishToMavenLocal --no-daemon
working-directory: a2ui/client/android/GoogleMapsA2UI

- name: Build and test sample app
run: |
# app/build.gradle explicitly configures ~/.android/debug.keystore in signingConfigs.debug.
mkdir -p "$HOME/.android"
if [ ! -f "$HOME/.android/debug.keystore" ]; then
keytool -genkey -v \
-keystore "$HOME/.android/debug.keystore" \
-storepass android -alias androiddebugkey -keypass android \
-keyalg RSA -keysize 2048 -validity 10000 \
-dname "CN=Android Debug,O=Android,C=US"
fi
cat << 'EOF' > local.properties
MAPS_API_KEY=AIzaSyDummyKeyForCITestingOnly00000000
GATEWAY_API_KEY=AIzaSyDummyKeyForCITestingOnly00000000
GATEWAY_URL=http://10.0.2.2:10002
EOF
chmod +x ./gradlew
./gradlew testDebugUnitTest assembleDebug assembleDebugAndroidTest --no-daemon
working-directory: a2ui-samples/client/android
96 changes: 96 additions & 0 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: iOS CI

on:
pull_request:
branches: [ main ]
workflow_dispatch:

# Cancel superseded pull_request runs when a newer commit is pushed to the same
# PR. Other events get a per-commit group, so they are never cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
build:
name: iOS CI / build
# Pinned to macos-15 so the bundled Xcode and iOS Simulator lineup stay stable.
# zizmor: ignore[unpinned-images]
runs-on: macos-15
timeout-minutes: 30

steps:
- name: Checkout samples repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: a2ui-samples
persist-credentials: false

- name: Resolve core SDK branch
id: core_ref
env:
HEAD_REF: ${{ github.head_ref }}
run: |
RESOLVED_REF="main"
case "$HEAD_REF" in
test_*)
# Poll up to 80s for the parallel Copybara-Review-a2ui-core export to push test_<OCL>.
for ATTEMPT in $(seq 1 9); do
if git ls-remote --exit-code --heads https://github.com/googlemaps/a2ui.git "refs/heads/$HEAD_REF" >/dev/null 2>&1; then
RESOLVED_REF="$HEAD_REF"
break
fi
if [ "$ATTEMPT" -lt 9 ]; then
echo "Waiting 10s for Copybara to push $HEAD_REF to googlemaps/a2ui (attempt $ATTEMPT/9)..."
sleep 10
fi
done
if [ "$RESOLVED_REF" = "main" ]; then
echo "::warning::Branch $HEAD_REF not found on googlemaps/a2ui after 80s; falling back to main."
fi
;;
esac
echo "Using googlemaps/a2ui ref: $RESOLVED_REF"
echo "ref=$RESOLVED_REF" >> "$GITHUB_OUTPUT"

- name: Checkout core SDK repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: googlemaps/a2ui
ref: ${{ steps.core_ref.outputs.ref }}
path: a2ui
persist-credentials: false

- name: Build and test sample app
run: |
xcodebuild build-for-testing \
-project A2UI-Example.xcodeproj \
-scheme A2UI-Example \
-destination 'platform=iOS Simulator,name=iPhone 16' \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO
xcodebuild test-without-building \
-project A2UI-Example.xcodeproj \
-scheme A2UI-Example \
-destination 'platform=iOS Simulator,name=iPhone 16' \
-only-testing:A2UI-ExampleTests \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO
working-directory: a2ui-samples/client/ios
71 changes: 62 additions & 9 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,89 @@ on:
pull_request:
branches: [ main ]

# Cancel superseded pull_request runs when a newer commit is pushed to the same
# PR. Other events get a per-commit group, so they are never cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
name: Python CI / build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Checkout samples repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: a2ui-samples
persist-credentials: false

- name: Resolve core SDK branch
id: core_ref
env:
HEAD_REF: ${{ github.head_ref }}
run: |
RESOLVED_REF="main"
case "$HEAD_REF" in
test_*)
# Poll up to 80s for the parallel Copybara-Review-a2ui-core export to push test_<OCL>.
for ATTEMPT in $(seq 1 9); do
if git ls-remote --exit-code --heads https://github.com/googlemaps/a2ui.git "refs/heads/$HEAD_REF" >/dev/null 2>&1; then
RESOLVED_REF="$HEAD_REF"
break
fi
if [ "$ATTEMPT" -lt 9 ]; then
echo "Waiting 10s for Copybara to push $HEAD_REF to googlemaps/a2ui (attempt $ATTEMPT/9)..."
sleep 10
fi
done
if [ "$RESOLVED_REF" = "main" ]; then
echo "::warning::Branch $HEAD_REF not found on googlemaps/a2ui after 80s; falling back to main."
fi
;;
esac
echo "Using googlemaps/a2ui ref: $RESOLVED_REF"
echo "ref=$RESOLVED_REF" >> "$GITHUB_OUTPUT"

- name: Checkout core SDK repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: googlemaps/a2ui
ref: ${{ steps.core_ref.outputs.ref }}
path: a2ui
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
enable-cache: auto

- name: Set up Python
run: uv python install
run: uv python install 3.13

- name: Install dependencies
run: uv sync --all-groups
working-directory: agent/python
continue-on-error: true
- name: Configure local MAUI SDK path and install dependencies
run: |
chmod +x setup.sh
./setup.sh ../../../a2ui/agent/python_agent
uv sync --all-groups
working-directory: a2ui-samples/agent/python

- name: Verify sample agent imports and CLI entrypoint
run: uv run python __main__.py --help
working-directory: a2ui-samples/agent/python

- name: Run unit tests
run: uv run python -m unittest discover -s . -p "test_*.py"
working-directory: a2ui-samples/agent/python

- name: Type check with pyright
run: uv run pyright
working-directory: agent/python
working-directory: a2ui-samples/agent/python
continue-on-error: true

- name: Lint with ruff
run: uv run ruff check .
working-directory: agent/python
working-directory: a2ui-samples/agent/python
continue-on-error: true
66 changes: 54 additions & 12 deletions .github/workflows/web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,75 @@ on:
pull_request:
branches: [ main ]

# Cancel superseded pull_request runs when a newer commit is pushed to the same
# PR. Other events get a per-commit group, so they are never cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
name: Web CI / build
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkout samples repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: a2ui-samples
persist-credentials: false

- name: Resolve core SDK branch
id: core_ref
env:
HEAD_REF: ${{ github.head_ref }}
run: |
RESOLVED_REF="main"
case "$HEAD_REF" in
test_*)
# Poll up to 80s for the parallel Copybara-Review-a2ui-core export to push test_<OCL>.
for ATTEMPT in $(seq 1 9); do
if git ls-remote --exit-code --heads https://github.com/googlemaps/a2ui.git "refs/heads/$HEAD_REF" >/dev/null 2>&1; then
RESOLVED_REF="$HEAD_REF"
break
fi
if [ "$ATTEMPT" -lt 9 ]; then
echo "Waiting 10s for Copybara to push $HEAD_REF to googlemaps/a2ui (attempt $ATTEMPT/9)..."
sleep 10
fi
done
if [ "$RESOLVED_REF" = "main" ]; then
echo "::warning::Branch $HEAD_REF not found on googlemaps/a2ui after 80s; falling back to main."
fi
;;
esac
echo "Using googlemaps/a2ui ref: $RESOLVED_REF"
echo "ref=$RESOLVED_REF" >> "$GITHUB_OUTPUT"

- name: Checkout core SDK repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: googlemaps/a2ui
ref: ${{ steps.core_ref.outputs.ref }}
path: a2ui
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '22'

- name: Install dependencies
run: npm install
working-directory: client/web/react
- name: Build and link core Web SDK
run: npm run build-and-link
working-directory: a2ui/client/web

- name: Type check
run: npx tsc --noEmit
working-directory: client/web/react
continue-on-error: true
- name: Install dependencies
run: |
npm install
npm link @googlemaps/a2ui
working-directory: a2ui-samples/client/web/react

- name: Build
- name: Type check and build
run: npm run build
working-directory: client/web/react
continue-on-error: true
working-directory: a2ui-samples/client/web/react
Loading
Loading