Skip to content
Merged
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
27 changes: 23 additions & 4 deletions .github/workflows/android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
branches:
- "main"
- "arena/**"
paths:
- "app/**"
- "third_party/**"
- "*.gradle.kts"
- "gradle.properties"
- ".github/workflows/android-apk.yml"
tags:
- "v*"

Expand Down Expand Up @@ -42,7 +48,7 @@ jobs:
id: build
run: |
set -o pipefail
gradle --no-daemon :app:assembleDebug 2>&1 | tee /tmp/gradle-build.log
gradle --no-daemon :stream-common:testDebugUnitTest :stream-rtmp:testDebugUnitTest :app:testDebugUnitTest :app:assembleDebug 2>&1 | tee /tmp/gradle-build.log

- name: Post Gradle diagnostics to the temporary issue on failure
if: failure() && steps.build.outcome == 'failure'
Expand All @@ -61,12 +67,24 @@ jobs:
echo '<details><summary>Build log tail</summary>'
echo
echo '```text'
tail -c 30000 /tmp/gradle-build.log
tail -c 24000 /tmp/gradle-build.log
find app/build/test-results third_party/rootencoder -path '*/test-results/*/*.xml' -type f -exec grep -A 12 '<failure' {} \; 2>/dev/null | head -80 || true
echo '```'
echo '</details>'
} > /tmp/diagnostics.md
gh issue comment 4 --body-file /tmp/diagnostics.md

- name: Upload unit test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-reports
path: |
app/build/reports/tests/
third_party/rootencoder/*/build/reports/tests/
if-no-files-found: ignore
retention-days: 14

- name: Name APK for download
run: cp app/build/outputs/apk/debug/app-debug.apk ScreenKit.apk

Expand All @@ -81,8 +99,9 @@ jobs:
- name: Publish APK to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'v2.0.0' }}
name: ScreenKit ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'v2.0.0' }}
tag_name: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'v2.2.0' }}
name: ScreenKit ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'v2.2.0' }}
target_commitish: ${{ github.sha }}
make_latest: true
generate_release_notes: true
files: ScreenKit.apk
72 changes: 72 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: iOS Build
on:
workflow_dispatch:
push:
branches: [main, 'arena/**']
paths: ['ios/**', '.github/workflows/ios-build.yml']
pull_request:
paths: ['ios/**', '.github/workflows/ios-build.yml']
permissions:
contents: read
issues: write
concurrency:
group: ios-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Toolchain
run: xcodebuild -version && swift --version
- name: Core unit tests
run: |
set -o pipefail
swift test --package-path ios/ScreenKitCore 2>&1 | tee /tmp/ios-tests.log
- name: Generate native Xcode project
run: |
brew install xcodegen
ios/scripts/generate.sh
- name: Build iPhone and iPad app with broadcast extension (unsigned)
run: |
set -o pipefail
xcodebuild -project ios/ScreenKit.xcodeproj -scheme ScreenKit -configuration Release \
-destination 'generic/platform=iOS' -derivedDataPath ios/build/device \
CODE_SIGNING_ALLOWED=NO build 2>&1 | tee /tmp/ios-build.log
- name: Build simulator app
run: |
set -o pipefail
xcodebuild -project ios/ScreenKit.xcodeproj -scheme ScreenKit -configuration Debug \
-destination 'generic/platform=iOS Simulator' -derivedDataPath ios/build/simulator \
CODE_SIGNING_ALLOWED=NO build 2>&1 | tee /tmp/ios-simulator.log
ditto -c -k --sequesterRsrc --keepParent ios/build/simulator/Build/Products/Debug-iphonesimulator/ScreenKit.app ios/build/ScreenKit-Simulator.zip
- name: Build artifacts (not installable on iPhone)
uses: actions/upload-artifact@v4
with:
name: ScreenKit-iOS-unsigned-and-simulator
path: |
ios/build/ScreenKit-Simulator.zip
ios/build/device/Build/Products/Release-iphoneos/
ios/ScreenKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
retention-days: 14
- name: Post diagnostics on failure
if: failure() && github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
{
echo "iOS build failed on ${{ github.ref_name }} @ ${{ github.sha }}"
echo "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo '```text'
cat /tmp/ios-tests.log /tmp/ios-build.log /tmp/ios-simulator.log 2>/dev/null | tail -c 24000 || true
echo '```'
} > /tmp/ios-diagnostics.md
gh issue comment 4 --body-file /tmp/ios-diagnostics.md
- name: Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ios-build-logs
path: /tmp/ios-*.log
if-no-files-found: ignore
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ captures/
# OS/editor noise
.DS_Store
Thumbs.db

# Native iOS generated outputs / signing material
ios/ScreenKit.xcodeproj/
**/.build/
**/DerivedData/
**/*.xcuserstate
**/xcuserdata/
*.ipa
*.p12
*.mobileprovision
# Synthetic TLS regression fixture, not a signing identity
!third_party/rootencoder/common/src/test/resources/localhost-test-only.p12
Loading
Loading