Add USB tether transport with source-timed A/V #84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android APK | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Test, lint, and build debug APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android build packages | |
| run: sdkmanager "platforms;android-35" "build-tools;35.0.0" "cmake;3.22.1" "ndk;27.0.12077973" | |
| - name: Compute Android version metadata | |
| id: version | |
| run: | | |
| echo "code=$(git log -1 --format=%ct)" >> "$GITHUB_OUTPUT" | |
| - name: Run repository tests | |
| run: | | |
| python -m pip install --disable-pip-version-check pytest | |
| python -m pytest -q | |
| - name: Run Android unit tests and lint, then build APK | |
| working-directory: android | |
| env: | |
| OPENSTREAM_VERSION_NAME: 1.0.1 | |
| OPENSTREAM_VERSION_CODE: ${{ steps.version.outputs.code }} | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew --no-daemon :app:testDebugUnitTest :app:lintDebug :app:assembleDebug | |
| - name: Normalize Android build assets | |
| run: | | |
| mkdir -p dist | |
| cp android/app/build/outputs/apk/debug/app-debug.apk dist/openstream-android.apk | |
| (cd dist && sha256sum openstream-android.apk > openstream-android.apk.sha256) | |
| printf 'debug-signed\n' > dist/android-signing.txt | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openstream-android-debug-apk | |
| path: | | |
| dist/openstream-android.apk | |
| dist/openstream-android.apk.sha256 | |
| dist/android-signing.txt | |
| if-no-files-found: error |