2024-04-19 15:49:30 -06:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2024-04-20 10:12:52 -06:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- master
|
2024-12-06 00:41:13 +03:00
|
|
|
- extended
|
2024-12-06 16:43:00 +03:00
|
|
|
- '**-feature-**'
|
2024-04-20 10:12:52 -06:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'doc/**'
|
|
|
|
- 'fastlane/**'
|
|
|
|
- 'assets/**'
|
|
|
|
- '.github/**/*.md'
|
|
|
|
- '.github/FUNDING.yml'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'doc/**'
|
|
|
|
- 'fastlane/**'
|
|
|
|
- 'assets/**'
|
|
|
|
- '.github/**/*.md'
|
|
|
|
- '.github/FUNDING.yml'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2024-04-19 15:49:30 -06:00
|
|
|
|
|
|
|
jobs:
|
2024-04-20 10:12:52 -06:00
|
|
|
build:
|
2024-04-19 15:49:30 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2024-04-20 10:12:52 -06:00
|
|
|
permissions: write-all
|
|
|
|
|
2024-04-19 15:49:30 -06:00
|
|
|
steps:
|
2024-04-20 10:12:52 -06:00
|
|
|
- name: Checkout branch "${{ github.ref_name }}"
|
2024-12-06 16:43:00 +03:00
|
|
|
env:
|
|
|
|
BRANCH: ${{ github.ref_name }}
|
2024-04-20 10:12:52 -06:00
|
|
|
run: |
|
2024-07-26 22:55:05 +03:00
|
|
|
git clone --no-checkout https://github.com/MaintainTeam/LastPipeBender.git .
|
2024-12-06 16:43:00 +03:00
|
|
|
git checkout --progress --force "$BRANCH"
|
2024-04-20 10:12:52 -06:00
|
|
|
|
2024-12-02 18:40:33 +03:00
|
|
|
- name: Set up JDK
|
2024-04-20 10:12:52 -06:00
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
2024-10-22 20:57:21 +02:00
|
|
|
java-version: 21
|
2024-04-20 10:12:52 -06:00
|
|
|
distribution: "temurin"
|
|
|
|
cache: 'gradle'
|
|
|
|
|
|
|
|
- name: Build debug APK and run jvm tests
|
|
|
|
run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint
|
|
|
|
|
2024-12-06 01:29:39 +03:00
|
|
|
- name: Generate checksum
|
|
|
|
run: |
|
|
|
|
sha256sum app/build/outputs/apk/debug/*.apk > app/build/outputs/apk/debug/checksums.txt
|
|
|
|
echo "::notice::$(cat app/build/outputs/apk/debug/checksums.txt)"
|
|
|
|
|
2024-04-20 10:12:52 -06:00
|
|
|
- name: Upload APK
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: app
|
|
|
|
path: app/build/outputs/apk/debug/*.apk
|
2021-01-06 16:32:33 +01:00
|
|
|
|
2024-11-25 18:38:21 +03:00
|
|
|
#
|
|
|
|
# TEST WORKFLOW OF UPSTREAM NEWPIPE
|
|
|
|
#
|
|
|
|
# test-android:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# timeout-minutes: 20
|
|
|
|
# strategy:
|
|
|
|
# matrix:
|
|
|
|
# include:
|
|
|
|
# - api-level: 21
|
|
|
|
# target: default
|
|
|
|
# arch: x86
|
|
|
|
# - api-level: 33
|
|
|
|
# target: google_apis # emulator API 33 only exists with Google APIs
|
|
|
|
# arch: x86_64
|
|
|
|
|
|
|
|
# permissions:
|
|
|
|
# contents: read
|
|
|
|
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v4
|
|
|
|
|
|
|
|
# - name: Enable KVM
|
|
|
|
# run: |
|
|
|
|
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
|
|
# sudo udevadm control --reload-rules
|
|
|
|
# sudo udevadm trigger --name-match=kvm
|
|
|
|
|
|
|
|
# - name: set up JDK
|
|
|
|
# uses: actions/setup-java@v4
|
|
|
|
# with:
|
|
|
|
# java-version: 21
|
|
|
|
# distribution: "temurin"
|
|
|
|
# cache: 'gradle'
|
|
|
|
|
|
|
|
# - name: Run android tests
|
|
|
|
# uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
# with:
|
|
|
|
# api-level: ${{ matrix.api-level }}
|
|
|
|
# target: ${{ matrix.target }}
|
|
|
|
# arch: ${{ matrix.arch }}
|
|
|
|
# script: ./gradlew connectedCheck --stacktrace
|
|
|
|
|
|
|
|
# - name: Upload test report when tests fail # because the printed out stacktrace (console) is too short, see also #7553
|
|
|
|
# uses: actions/upload-artifact@v4
|
|
|
|
# if: failure()
|
|
|
|
# with:
|
|
|
|
# name: android-test-report-api${{ matrix.api-level }}
|
|
|
|
# path: app/build/reports/androidTests/connected/**
|
|
|
|
|
|
|
|
# sonar:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
# permissions:
|
|
|
|
# contents: read
|
|
|
|
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v4
|
|
|
|
# with:
|
|
|
|
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
|
|
|
|
|
|
# - name: Set up JDK
|
|
|
|
# uses: actions/setup-java@v4
|
|
|
|
# with:
|
|
|
|
# java-version: 21
|
|
|
|
# distribution: "temurin"
|
|
|
|
# cache: 'gradle'
|
|
|
|
|
|
|
|
# - name: Cache SonarCloud packages
|
|
|
|
# uses: actions/cache@v4
|
|
|
|
# with:
|
|
|
|
# path: ~/.sonar/cache
|
|
|
|
# key: ${{ runner.os }}-sonar
|
|
|
|
# restore-keys: ${{ runner.os }}-sonar
|
|
|
|
|
|
|
|
# - name: Build and analyze
|
|
|
|
# env:
|
|
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
|
|
|
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
|
|
# run: ./gradlew build sonar --info
|