f098fb4cdc
Bumps the actions group with 4 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/github-script](https://github.com/actions/github-script), [nick-fields/retry](https://github.com/nick-fields/retry) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) Updates `actions/github-script` from 7 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v9) Updates `nick-fields/retry` from 3.0.2 to 4.0.0 - [Release notes](https://github.com/nick-fields/retry/releases) - [Commits](https://github.com/nick-fields/retry/compare/ce71cc2ab81d554ebbe88c79ab5975992d79ba08...ad984534de44a9489a53aefd81eb77f87c70dc60) Updates `softprops/action-gh-release` from 2.6.2 to 3.0.0 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/3bb12739c298aeb8a4eeaf626c5b8d85266b0e65...b4309332981a82ec1c5618f44dd2e27cc8bfbfda) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: nick-fields/retry dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
171 lines
4.3 KiB
YAML
171 lines
4.3 KiB
YAML
name: Test/Build
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 21
|
|
cache: gradle
|
|
|
|
- name: Linter (gradle)
|
|
run: ./gradlew spotlessCheck
|
|
|
|
test:
|
|
needs: lint
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 21
|
|
cache: gradle
|
|
|
|
- name: Test (gradle)
|
|
run: ./gradlew test --no-daemon
|
|
|
|
- name: Stop Gradle Daemon
|
|
if: always()
|
|
run: ./gradlew --stop
|
|
|
|
- name: Android Test Report
|
|
uses: asadmansr/android-test-report-action@v1.2.0
|
|
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v7
|
|
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
|
|
with:
|
|
name: Test Reports
|
|
path: amethyst/build/reports
|
|
|
|
build-android:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 21
|
|
cache: gradle
|
|
|
|
- name: Build APK (gradle)
|
|
run: ./gradlew assembleDebug
|
|
|
|
- name: Upload Play APK
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Play Debug APK
|
|
path: amethyst/build/outputs/apk/play/debug/amethyst-play-universal-debug.apk
|
|
|
|
- name: Upload FDroid APK
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: FDroid Debug APK
|
|
path: amethyst/build/outputs/apk/fdroid/debug/amethyst-fdroid-universal-debug.apk
|
|
|
|
- name: Build Benchmark APK (gradle)
|
|
run: ./gradlew assembleBenchmark
|
|
|
|
- name: Upload Play APK Benchmark
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Play Benchmark APK
|
|
path: amethyst/build/outputs/apk/play/benchmark/amethyst-play-universal-benchmark.apk
|
|
|
|
- name: Upload FDroid APK Benchmark
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: FDroid Benchmark APK
|
|
path: amethyst/build/outputs/apk/fdroid/benchmark/amethyst-fdroid-universal-benchmark.apk
|
|
|
|
- name: Upload Compose Reports
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Compose Reports
|
|
path: amethyst/build/compose_compiler
|
|
|
|
build-desktop:
|
|
needs: test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
task: packageDeb
|
|
artifact-name: Desktop Linux DEB
|
|
artifact-path: desktopApp/build/compose/binaries/main/deb/*.deb
|
|
- os: macos-latest
|
|
task: packageDmg
|
|
artifact-name: Desktop macOS DMG
|
|
artifact-path: desktopApp/build/compose/binaries/main/dmg/*.dmg
|
|
- os: windows-latest
|
|
task: packageMsi
|
|
artifact-name: Desktop Windows MSI
|
|
artifact-path: desktopApp/build/compose/binaries/main/msi/*.msi
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 21
|
|
cache: gradle
|
|
|
|
- name: Build Desktop Distribution
|
|
run: ./gradlew :desktopApp:${{ matrix.task }}
|
|
|
|
- name: Stop Gradle Daemon
|
|
if: always()
|
|
run: ./gradlew --stop
|
|
|
|
- name: Upload Desktop Distribution
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ${{ matrix.artifact-name }}
|
|
path: ${{ matrix.artifact-path }}
|