* Add Rust implementation to detect QRCode from bitmap * Add QRCodeInterceptor Framework * Let image take hasQRCode info * Keep ReaderPage index internal * Move imageCache to use ReaderPage as key * Make PageLoader size & pages internal * Refine * Kill entry if QRCode * Rewrite request to respect index mapping * Debug: enable by default * Fix crash * Fixup * Fix identity * Revert to lruCache to avoid crash * Fixup * Clippy check for android only * Fixup * Resolve clippy * Switch * Apply switch * Restart pageloader restore pages * Cleanup * Cleanup Signed-off-by: Dude so hot <djohn@fbi.gov> * let it inference Signed-off-by: Dude so hot <djohn@fbi.gov> * Don't detect border for ads * Make coil interceptor runs in `Dispatchers.Default` * Revert "Restart pageloader restore pages" This reverts commit 8fd02fb7d9c677c119df72a767a6079f1899dc31. * Revert drop page changes * Use backGround color painter for ads * Only check ads for tags contains extraneous ads * Only check ads for head 5 images || tail 10 images * Move strip ADs switch to AdvancedScreen * Pick placeholder * Show Placeholder * Don't try to extract & decode Signed-off-by: Dude so hot <djohn@fbi.gov> * cleanup Signed-off-by: Dude so hot <djohn@fbi.gov> * Naming * Naming * Naming * Naming * For ArchivePageLoader as well * Hint * Fix flicker * Refine * Naming * QR -> Qr * Naming * QR -> Qr * Naming * Refine * Revert * Remove header check * Allow show ads * Adjust * Refine * Revert "Don't try to extract & decode" This reverts commit f35ef46f6ffc81485cf0f4c646ed79e524c29d32. Signed-off-by: Dude so hot <djohn@fbi.gov> * be strict Signed-off-by: Dude so hot <djohn@fbi.gov> * Just Extract, don't decode * Refine * Refine placeholder --------- Signed-off-by: Dude so hot <djohn@fbi.gov> Co-authored-by: Dude so hot <djohn@fbi.gov> Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
184 lines
5.6 KiB
YAML
184 lines
5.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
|
|
- name: Install Rust Toolchain
|
|
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: "./app/src/main/rust"
|
|
shared-key: ${{ runner.os }}
|
|
|
|
- name: Rustfmt Check
|
|
working-directory: ./app/src/main/rust
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy Check
|
|
working-directory: ./app/src/main/rust
|
|
run: cargo clippy --target aarch64-linux-android --all-features -- -D warnings
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
cache-read-only: true
|
|
|
|
- name: Spotless Check
|
|
run: ./gradlew spotlessCheck
|
|
|
|
- name: Lint Check
|
|
run: ./gradlew lintMarshmallowRelease
|
|
|
|
default:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
|
|
- name: Install Rust Toolchain
|
|
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: "./app/src/main/rust"
|
|
shared-key: ${{ runner.os }}
|
|
save-if: "false"
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
|
|
|
|
- name: CMake Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: app/.cxx
|
|
key: cmake-default-${{ hashFiles('gradle/libs.versions.toml', 'app/build.gradle.kts', 'app/src/main/cpp/CMakeLists.txt') }}
|
|
restore-keys: cmake-default-
|
|
|
|
- name: Build
|
|
run: ./gradlew assembleDefaultRelease
|
|
|
|
- name: Upload ARM64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: default-arm64-v8a-${{ github.sha }}
|
|
path: app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk
|
|
|
|
- name: Upload x86_64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: default-x86_64-${{ github.sha }}
|
|
path: app/build/outputs/apk/default/release/app-default-x86_64-release.apk
|
|
|
|
- name: Upload ARM32
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: default-armeabi-v7a-${{ github.sha }}
|
|
path: app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk
|
|
|
|
- name: Upload mapping
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: default-mapping-${{ github.sha }}
|
|
path: app/build/outputs/mapping/defaultRelease
|
|
|
|
- name: Upload native debug symbols
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: default-native-debug-symbols-${{ github.sha }}
|
|
path: app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip
|
|
|
|
marshmallow:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
|
|
- name: Install Rust Toolchain
|
|
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: "./app/src/main/rust"
|
|
shared-key: ${{ runner.os }}
|
|
save-if: "false"
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
|
|
|
|
- name: CMake Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: app/.cxx
|
|
key: cmake-marshmallow-${{ hashFiles('gradle/libs.versions.toml', 'app/build.gradle.kts', 'app/src/main/cpp/CMakeLists.txt') }}
|
|
restore-keys: cmake-marshmallow-
|
|
|
|
- name: Build
|
|
run: ./gradlew assembleMarshmallowRelease
|
|
|
|
- name: Upload ARM64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marshmallow-arm64-v8a-${{ github.sha }}
|
|
path: app/build/outputs/apk/marshmallow/release/app-marshmallow-arm64-v8a-release.apk
|
|
|
|
- name: Upload x86_64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marshmallow-x86_64-${{ github.sha }}
|
|
path: app/build/outputs/apk/marshmallow/release/app-marshmallow-x86_64-release.apk
|
|
|
|
- name: Upload ARM32
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marshmallow-armeabi-v7a-${{ github.sha }}
|
|
path: app/build/outputs/apk/marshmallow/release/app-marshmallow-armeabi-v7a-release.apk
|
|
|
|
- name: Upload mapping
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marshmallow-mapping-${{ github.sha }}
|
|
path: app/build/outputs/mapping/marshmallowRelease
|
|
|
|
- name: Upload native debug symbols
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marshmallow-native-debug-symbols-${{ github.sha }}
|
|
path: app/build/outputs/native-debug-symbols/marshmallowRelease/native-debug-symbols.zip
|