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
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,32 @@ on:
permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}

jobs:
repo-checks:
name: Repository checks
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Set up JDK 21
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: '21'

- name: Set up Android SDK
uses: android-actions/setup-android@v3
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
with:
packages: 'platforms;android-35'

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'
cache: npm
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ concurrency:
jobs:
emulator-smoke:
name: Boot emulator and run OpenPhone smoke
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: [self-hosted, openphone-emulator]
timeout-minutes: 180
env:
Expand All @@ -63,7 +62,7 @@ jobs:
OPENPHONE_EMULATOR_ASSISTANT_SMOKE: ${{ inputs.assistant_smoke == 'false' && '0' || '1' }}
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
clean: false

Expand All @@ -90,7 +89,7 @@ jobs:

- name: Upload emulator smoke artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openphone-emulator-smoke
path: .worktree/lab/*/artifacts/emulator-smoke/
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ on:
permissions:
contents: read

concurrency:
group: eval-device-runner
cancel-in-progress: false

jobs:
trajectory-smokes:
name: Trajectory smokes
runs-on: [self-hosted, openphone-device]
timeout-minutes: 45
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Validate repository
run: |
Expand Down Expand Up @@ -70,15 +74,15 @@ jobs:

- name: Upload trajectories
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openphone-trajectories
path: .worktree/eval-trajectories/
if-no-files-found: warn

- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openphone-benchmark-results
path: .worktree/evals/
Expand Down
32 changes: 25 additions & 7 deletions .github/workflows/gcp-lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,42 @@ jobs:
OPENPHONE_GCP_BOOT_DISK_TYPE: ${{ vars.OPENPHONE_GCP_BOOT_DISK_TYPE || 'pd-ssd' }}
OPENPHONE_GCP_CACHE_SOURCE_SNAPSHOT: ${{ vars.OPENPHONE_GCP_CACHE_SOURCE_SNAPSHOT || '' }}
steps:
- name: Require maintainer to apply the label
if: ${{ github.event_name == 'pull_request_target' }}
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
set -euo pipefail
permission="$(gh api "repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission" --jq '.permission')"
case "$permission" in
admin|maintain|write)
echo "Label applied by ${{ github.actor }} with $permission permission"
;;
*)
echo "Label applied by ${{ github.actor }} with insufficient permission: $permission" >&2
exit 1
;;
esac

- name: Check out trusted workflow repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.event.pull_request.base.sha || github.sha }}

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: "21"

- name: Set up Android SDK
uses: android-actions/setup-android@v3
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
with:
packages: "platforms;android-35"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"

Expand All @@ -144,13 +162,13 @@ jobs:
git diff --check

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2.1.13
with:
workload_identity_provider: ${{ vars.OPENPHONE_GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.OPENPHONE_GCP_SERVICE_ACCOUNT }}

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f # v2.2.1

- name: Select target
id: target
Expand Down Expand Up @@ -252,7 +270,7 @@ jobs:

- name: Upload GCP lab artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openphone-gcp-lab
path: .worktree/gcp-lab/
Expand Down
60 changes: 47 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ permissions:
contents: write
id-token: write

concurrency:
group: release-${{ inputs.version }}
cancel-in-progress: false

jobs:
gcp-lab-smoke:
name: Release GCP lab smoke
Expand All @@ -79,22 +83,32 @@ jobs:
OPENPHONE_GCP_BOOT_DISK_TYPE: ${{ vars.OPENPHONE_GCP_BOOT_DISK_TYPE || 'pd-ssd' }}
OPENPHONE_GCP_CACHE_SOURCE_SNAPSHOT: ${{ vars.OPENPHONE_GCP_CACHE_SOURCE_SNAPSHOT || '' }}
steps:
- name: Validate version input
env:
RELEASE_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
if [[ ! "$RELEASE_VERSION" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([-.][A-Za-z0-9.-]+)?$ ]]; then
echo "Invalid version input: $RELEASE_VERSION" >&2
exit 1
fi

- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: "21"

- name: Set up Android SDK
uses: android-actions/setup-android@v3
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
with:
packages: "platforms;android-35"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"

Expand All @@ -107,13 +121,13 @@ jobs:
test -f "${{ inputs.release_notes }}"

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2.1.13
with:
workload_identity_provider: ${{ vars.OPENPHONE_GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.OPENPHONE_GCP_SERVICE_ACCOUNT }}

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f # v2.2.1

- name: Run release GCP lab smoke
run: |
Expand Down Expand Up @@ -143,7 +157,7 @@ jobs:

- name: Upload GCP lab artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openphone-release-gcp-lab
path: .worktree/gcp-lab/
Expand All @@ -156,22 +170,32 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Validate version input
env:
RELEASE_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
if [[ ! "$RELEASE_VERSION" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([-.][A-Za-z0-9.-]+)?$ ]]; then
echo "Invalid version input: $RELEASE_VERSION" >&2
exit 1
fi

- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: "21"

- name: Set up Android SDK
uses: android-actions/setup-android@v3
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
with:
packages: "platforms;android-35"

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"

Expand Down Expand Up @@ -207,8 +231,18 @@ jobs:
OPENPHONE_RELEASE: bp4a
OPENPHONE_BUILD_GOAL: otapackage
steps:
- name: Validate version input
env:
RELEASE_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
if [[ ! "$RELEASE_VERSION" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([-.][A-Za-z0-9.-]+)?$ ]]; then
echo "Invalid version input: $RELEASE_VERSION" >&2
exit 1
fi

- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Validate repository
run: |
Expand Down Expand Up @@ -243,7 +277,7 @@ jobs:
echo "artifacts_path=${staging}/ARTIFACTS.md" >> "$GITHUB_OUTPUT"

- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
tag_name: ${{ inputs.version }}
name: ${{ inputs.version }}
Expand Down
Loading