Skip to content

Bump the androidx group across 1 directory with 6 updates #189

Bump the androidx group across 1 directory with 6 updates

Bump the androidx group across 1 directory with 6 updates #189

Workflow file for this run

name: Build
# Saves build minutes (private repos have a monthly limit):
# - only the parts whose files changed are built and tested,
# - a newer push cancels the build still running for the same branch,
# - the Windows installers are built only on request ("Run workflow" with "windows") and for
# releases (release.yml); the Windows app's tests run on Linux, which costs half as much.
on:
push:
pull_request:
workflow_dispatch:
inputs:
windows:
description: Also build the Windows installers (MSI/EXE)
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
# When the comparison fails (e.g. after a branch was renamed), everything is built.
outputs:
plugin: ${{ steps.filter.outcome == 'success' && steps.filter.outputs.plugin || 'true' }}
android: ${{ steps.filter.outcome == 'success' && steps.filter.outputs.android || 'true' }}
desktop: ${{ steps.filter.outcome == 'success' && steps.filter.outputs.desktop || 'true' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: filter
continue-on-error: true
with:
# A push is compared with the commit before it, not with a branch name.
base: ${{ github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000' && github.event.before || '' }}
filters: |
plugin:
- 'plugin/**'
- '.github/workflows/build.yml'
android:
- 'android-app/**'
- '.github/workflows/build.yml'
desktop:
- 'desktop-app/**'
# The Windows app shares network code, models and texts with the phone app.
- 'android-app/app/src/main/java/**'
- 'android-app/app/src/main/res/values*/strings.xml'
- '.github/workflows/build.yml'
plugin:
needs: changes
if: needs.changes.outputs.plugin == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: maven
- name: Build and unit tests
run: mvn -B package
working-directory: plugin
- uses: actions/upload-artifact@v4
with:
name: RemoteMC-plugin
path: plugin/target/RemoteMC-*.jar
if-no-files-found: error
plugin-e2e:
# Starts a real Paper server with the plugin and runs the API checks against it.
needs: plugin
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: maven
- run: mvn -B -q package -DskipTests
working-directory: plugin
- name: Paper 1.21.4 end-to-end
working-directory: plugin/integration-test
run: |
./mkserver.sh paper 1.21.4 "$RUNNER_TEMP/paper"
./srv.sh start "$RUNNER_TEMP/paper" &
./srv.sh wait "$RUNNER_TEMP/paper"
python3 apitest.py "$RUNNER_TEMP/paper"
- name: Server log
if: always()
run: tail -n 200 "$RUNNER_TEMP/paper/server.log" || true
android:
needs: changes
if: needs.changes.outputs.android == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v4
- name: Lint, unit tests and screenshot comparison
run: ./gradlew lintGithubDebug lintPlayDebug testGithubDebugUnitTest -Proborazzi.test.verify=true
working-directory: android-app
- name: Release build
run: ./gradlew assembleGithubRelease bundlePlayRelease
working-directory: android-app
- uses: actions/upload-artifact@v4
with:
name: RemoteMC-app
path: android-app/app/build/outputs/apk/github/release/*.apk
if-no-files-found: error
# Google Play version (signed with the debug key here; the release workflow signs it for upload).
- uses: actions/upload-artifact@v4
with:
name: RemoteMC-app-play
path: android-app/app/build/outputs/bundle/playRelease/*.aab
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshot-diffs
path: android-app/app/build/outputs/roborazzi
desktop:
# Windows app: tests incl. screenshots of every screen (Compose Desktop runs on Linux too).
needs: changes
if: needs.changes.outputs.desktop == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
defaults:
run:
working-directory: desktop-app
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: jetbrains
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Tests
run: ./gradlew test
- uses: actions/upload-artifact@v4
if: always()
with:
name: desktop-screenshots
path: desktop-app/build/screenshots
desktop-windows:
# MSI and EXE installers with their own Java runtime (jpackage needs Windows) – only on request.
needs: desktop
if: github.event_name == 'workflow_dispatch' && inputs.windows
runs-on: windows-latest
defaults:
run:
shell: bash
working-directory: desktop-app
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
# JetBrains Runtime: the installer ships it, so the window keeps Windows' own frame
# (native dragging, snapping and animations) with RemoteMC's tabs in the title bar.
distribution: jetbrains
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Installers and portable JAR
run: ./gradlew packageMsi packageExe packageUberJarForCurrentOS
- uses: actions/upload-artifact@v4
with:
name: RemoteMC-Windows
path: |
desktop-app/build/compose/binaries/main/msi/*.msi
desktop-app/build/compose/binaries/main/exe/*.exe
desktop-app/build/compose/jars/*.jar
if-no-files-found: error