@@ -42,14 +42,14 @@ jobs:
4242 name : Record the Android shell
4343 if : github.repository == 'CopilotKit/OpenBot'
4444 runs-on : ubuntu-latest
45- timeout-minutes : 75
45+ timeout-minutes : 13
4646 permissions :
4747 contents : read
4848 env :
4949 API_LEVEL : " 35"
5050 ARTIFACTS : ${{ github.workspace }}/artifacts
5151 PRIVATE_ARTIFACTS : ${{ github.workspace }}/private-artifacts
52- VIDEO_PLAN : ${{ inputs.which || 'both' }}
52+ WHICH : ${{ inputs.which || 'both' }}
5353 GOOGLE_SIGN_IN : ${{ inputs.real_google_sign_in || 'false' }}
5454 steps :
5555 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6666 android-shell/gradle/wrapper/gradle-wrapper.properties
6767
6868 - name : Build the debug app and its tests
69- timeout-minutes : 25
69+ timeout-minutes : 5
7070 working-directory : android-shell
7171 run : |
7272 mkdir -p "$ARTIFACTS" "$PRIVATE_ARTIFACTS"
@@ -81,14 +81,20 @@ jobs:
8181 done
8282 exit 1
8383
84+ - name : Free the build's memory for the emulator
85+ run : |
86+ (cd android-shell && ./gradlew --stop > /dev/null 2>&1) || true
87+ pkill -f KotlinCompileDaemon || true
88+ free -m
89+
8490 - uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
85- if : env.VIDEO_PLAN != 'real'
91+ if : env.WHICH != 'real'
8692 with :
8793 bun-version : 1.4.3
8894
8995 - name : Build the web app and start mock stack A
90- if : env.VIDEO_PLAN != 'real'
91- timeout-minutes : 15
96+ if : env.WHICH != 'real'
97+ timeout-minutes : 3
9298 run : |
9399 bun install --frozen-lockfile
94100 cp .env.example .env
@@ -101,41 +107,57 @@ jobs:
101107 done
102108 echo "mock stack A did not start"; tail -n 40 "$ARTIFACTS/mock-a.log" "$ARTIFACTS/app-a.log"; exit 1
103109
110+ - name : Cache the emulator's system image
111+ uses : actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
112+ with :
113+ path : /usr/local/lib/android/sdk/system-images/android-35/google_apis/x86_64
114+ key : android-system-image-35-google_apis-x86_64-v1
115+
104116 - name : Enable KVM
105117 run : |
106118 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
107119 sudo udevadm control --reload-rules
108120 sudo udevadm trigger --name-match=kvm
109121
110122 - name : Boot the emulator (software keyboard on, animators on for the skeleton's shimmer)
111- timeout-minutes : 20
123+ timeout-minutes : 4
112124 env :
113125 ANIMATOR_SCALE : " 1"
114126 run : android-shell/ci/emulator.sh all
115127
116128 - name : Install the apps
117129 run : |
130+ command -v ffmpeg > /dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq ffmpeg > /dev/null; }
118131 adb install -r -g android-shell/app/build/outputs/apk/debug/app-debug.apk
119132 adb install -r -g android-shell/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
120133 if [ "$GOOGLE_SIGN_IN" = "true" ]; then
121134 adb install -r -g android-shell/app/build/outputs/apk/releaseTest/app-releaseTest.apk
122135 fi
123136
124- - name : Record
125- timeout-minutes : 40
137+ - name : Record the real-backend journey (private)
138+ if : env.WHICH != 'demo'
139+ timeout-minutes : 4
126140 env :
127141 RUN_MODE : video
142+ VIDEO_PLAN : real
128143 OPENBOT_SHELL_TEST_SESSION : ${{ secrets.OPENBOT_SHELL_TEST_SESSION }}
129144 OPENBOT_SHELL_GOOGLE_EMAIL : ${{ secrets.OPENBOT_SHELL_GOOGLE_EMAIL }}
130145 OPENBOT_SHELL_GOOGLE_PASSWORD : ${{ secrets.OPENBOT_SHELL_GOOGLE_PASSWORD }}
131146 OPENBOT_SHELL_GOOGLE_TOTP_SECRET : ${{ secrets.OPENBOT_SHELL_GOOGLE_TOTP_SECRET }}
132- run : |
133- command -v ffmpeg > /dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq ffmpeg > /dev/null; }
134- python3 android-shell/ci/run_tests.py "$ARTIFACTS" "$PRIVATE_ARTIFACTS" "$GITHUB_WORKSPACE"
147+ run : python3 android-shell/ci/run_tests.py "$ARTIFACTS" "$PRIVATE_ARTIFACTS" "$GITHUB_WORKSPACE"
148+
149+ - name : Record the demo tour
150+ if : always() && env.WHICH != 'real'
151+ timeout-minutes : 4
152+ env :
153+ RUN_MODE : video
154+ VIDEO_PLAN : demo
155+ run : python3 android-shell/ci/run_tests.py "$ARTIFACTS" "$PRIVATE_ARTIFACTS" "$GITHUB_WORKSPACE"
135156
136157 - name : Collect
137158 if : always()
138159 run : |
160+ free -m; sudo dmesg 2>/dev/null | grep -i -E "killed process|out of memory" | tail -5 || true
139161 python3 android-shell/ci/summarize.py "$ARTIFACTS" > /dev/null || true
140162 python3 android-shell/ci/collect.py "$ARTIFACTS" "$PRIVATE_ARTIFACTS" || true
141163 ls -la "$ARTIFACTS/video" "$PRIVATE_ARTIFACTS/video" 2>/dev/null || true
0 commit comments