Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github/workflows,Makefile: add a build check CI for the new app #193

Merged
merged 1 commit into from
Mar 14, 2024
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
34 changes: 34 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Android CI

on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest

if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:

- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Switch to Java 17 # Note: 17 is pre-installed on ubuntu-latest
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Build APKs
run: make tailscale-new-debug.apk tailscale-new-fdroid.apk

- name: Run tests
run: make test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Debug APK
name: Build Legacy Debug APK

on:
push:
Expand Down Expand Up @@ -27,5 +27,5 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Build APK
- name: Build Legacy APK
run: make tailscale-debug.apk
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,19 @@ tailscale-fdroid.apk: $(AAR)
(cd android_legacy && ./gradlew test assembleFdroidDebug)
mv android_legacy/build/outputs/apk/fdroid/debug/android_legacy-fdroid-debug.apk $@

tailscale-new-fdroid.apk: $(AAR)
tailscale-new-fdroid.apk: $(AAR_NEXTGEN)
(cd android && ./gradlew test assembleFdroidDebug)
raggi marked this conversation as resolved.
Show resolved Hide resolved
mv android/build/outputs/apk/fdroid/debug/android-fdroid-debug.apk $@

tailscale-new-debug: $(AAR)
tailscale-new-debug.apk: $(AAR_NEXTGEN)
(cd android && ./gradlew test assemblePlayDebug)
mv android/build/outputs/apk/play/debug/android-play-debug.apk $@

tailscale-new-debug: tailscale-new-debug.apk

test: $(AAR_NEXTGEN)
(cd android && ./gradlew test)

$(RELEASE_AAB): $(AAR)
(cd android_legacy && ./gradlew test bundlePlayRelease)
mv ./android_legacy/build/outputs/bundle/playRelease/android-play-release.aab $@
Expand Down
Loading