Skip to content

Merge branch 'dev_brave' #13

Merge branch 'dev_brave'

Merge branch 'dev_brave' #13

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
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/**'
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout branch "${{ github.ref_name }}"
run: |
git clone --no-checkout https://github.com/MaintainTeam/LastPipeBender.git .
git config core.symlinks false
git checkout --progress --force ${{ github.ref_name }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
cache: 'gradle'
# - name: Rename strings from NewPipe to BraveNewPipe
# run: ./gradlew bravify
# - name: Build brave flavor
# run: ./gradlew assembleBraveDebug
# - name: Build braveConscrypt flavor
# run: ./gradlew assembleBraveConscryptDebug
# - name: Prepare for building braveLegacy flavor
# run: ./gradlew prepareLegacyFlavor
# - name: Build braveLegacy flavor
# run: ./gradlew assembleBraveLegacyDebug
# - name: Unprepare for building braveLegacy flavor
# run: ./gradlew unPrepareLegacyFlavor
- name: Build debug APK and run jvm tests
run: ./gradlew assembleDebug testDebugUnitTest --stacktrace -DskipFormatKtlint
# lintDebug gives error: ask 'lintDebug' is ambiguous in root project 'LastPipeBender' and its subprojects. Candidates are: 'lintAnalyzeBraveConscryptDebug', 'lintAnalyzeBraveDebug', 'lintAnalyzeBraveLegacyDebug', 'lintAnalyzeSponsorblockDebug', 'lintBraveConscryptDebug', 'lintBraveDebug', 'lintBraveLegacyDebug', 'lintFixBraveConscryptDebug', 'lintFixBraveDebug', 'lintFixBraveLegacyDebug', 'lintFixSponsorblockDebug', 'lintReportBraveConscryptDebug', 'lintReportBraveDebug', 'lintReportBraveLegacyDebug', 'lintReportSponsorblockDebug', 'lintSponsorblockDebug'.
# run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: app
path: app/build/outputs/apk/debug/*.apk
# path: app/build/outputs/apk/brave*/debug/*.apk
# - name: Build debug APK and run jvm tests
# run: ./gradlew assembleBraveDebug lintBraveDebug testBraveDebugUnitTest --stacktrace -DskipFormatKtlint
# test-android:
# # macos has hardware acceleration. See android-emulator-runner action
# runs-on: macos-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: set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: 17
# 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 17
# uses: actions/setup-java@v4
# with:
# java-version: 17
# 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