feat: Add native Tsundoku (Tachiyomi/Mihon) extension support (NOT COMPLETE) #653
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Build and Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| - develop | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ==================== Build Jobs ==================== | |
| # ios-build: | |
| # name: iOS Build | |
| # runs-on: macos-14 | |
| # timeout-minutes: 60 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # - uses: actions/setup-java@v4 | |
| # with: | |
| # java-version: '21' | |
| # distribution: 'temurin' | |
| # cache: gradle | |
| # - name: Setup Gradle | |
| # uses: gradle/actions/setup-gradle@v3 | |
| # - name: Grant execute permission for gradlew | |
| # run: chmod +x gradlew | |
| # - name: Set up local.properties | |
| # run: | | |
| # echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties | |
| # echo "supabase.auth.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.auth.key=placeholder-key" >> local.properties | |
| # echo "supabase.reading.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.reading.key=placeholder-key" >> local.properties | |
| # echo "supabase.library.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.library.key=placeholder-key" >> local.properties | |
| # echo "supabase.book_reviews.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.book_reviews.key=placeholder-key" >> local.properties | |
| # echo "supabase.chapter_reviews.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.chapter_reviews.key=placeholder-key" >> local.properties | |
| # echo "supabase.badges.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.badges.key=placeholder-key" >> local.properties | |
| # echo "supabase.analytics.url=https://placeholder.supabase.co" >> local.properties | |
| # echo "supabase.analytics.key=placeholder-key" >> local.properties | |
| # - name: Build iOS Framework (Simulator) | |
| # run: | | |
| # ./gradlew :presentation:linkDebugFrameworkIosSimulatorArm64 \ | |
| # --no-daemon \ | |
| # --no-configuration-cache \ | |
| # -Dorg.gradle.jvmargs="-Xmx6g -XX:+UseG1GC -XX:MaxMetaspaceSize=1g" \ | |
| # -Pkotlin.native.cacheKind=none | |
| # - name: Copy Framework to Xcode location | |
| # run: | | |
| # FRAMEWORK_PATH="presentation/build/bin/iosSimulatorArm64/debugFramework" | |
| # DEST_PATH="presentation/build/xcode-frameworks/Debug/iphonesimulator" | |
| # mkdir -p "$DEST_PATH" | |
| # cp -R "$FRAMEWORK_PATH"/* "$DEST_PATH/" | |
| # - name: Build iOS App (Simulator) | |
| # run: | | |
| # SIMULATOR_ID=$(xcrun simctl list devices available | grep "iPhone" | head -1 | grep -oE '[A-F0-9-]{36}') | |
| # echo "Using simulator: $SIMULATOR_ID" | |
| # xcodebuild build \ | |
| # -project iosApp/iosApp.xcodeproj \ | |
| # -scheme iosApp \ | |
| # -configuration Debug \ | |
| # -sdk iphonesimulator \ | |
| # # -destination "id=$SIMULATOR_ID" \ | |
| # -destination "platform=iOS Simulator,name=iPhone 16 Pro Max" \ | |
| # ARCHS="arm64" \ | |
| # DEVELOPMENT_TEAM="ireader" \ | |
| # CODE_SIGN_IDENTITY="" \ | |
| # CODE_SIGNING_REQUIRED=NO \ | |
| # CODE_SIGNING_ALLOWED=NO | |
| # COMPILER_INDEX_STORE_ENABLE=NO | |
| # PRODUCT_BUNDLE_IDENTIFIER="ir.kazemcodes.infinityreader" | |
| # - name: Upload Framework Artifact | |
| # if: always() | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ios-framework-debug | |
| # path: presentation/build/bin/iosSimulatorArm64/debugFramework/ | |
| # retention-days: 7 | |
| BuildBinaries: | |
| name: Build application packages | |
| if: always() | |
| strategy: | |
| matrix: | |
| runtime: [ linux-x64, linux-fedora-x64, win-x64, android ] | |
| include: | |
| - runtime: linux-x64 | |
| arch: x64 | |
| os: ubuntu-latest | |
| shell: bash | |
| build: :desktop:packageDeb | |
| setupCl: ./.github/scripts/SetupClUnix.sh | |
| - runtime: linux-fedora-x64 | |
| arch: x64 | |
| os: ubuntu-latest | |
| shell: bash | |
| build: :desktop:packageRpm | |
| setupCl: ./.github/scripts/SetupClUnix.sh | |
| - runtime: win-x64 | |
| arch: x64 | |
| os: windows-latest | |
| shell: powershell | |
| build: :desktop:packageMsi | |
| setupCl: ./.github/scripts/SetupClWindows.ps1 | |
| - runtime: android | |
| arch: x64 | |
| os: ubuntu-latest | |
| shell: bash | |
| build: :android:assembleStandardRelease | |
| setupCl: ./.github/scripts/SetupClUnix.sh | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| if: ${{ matrix.runtime != 'linux-fedora-x64' }} | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| architecture: ${{ matrix.arch }} | |
| - name: Setup Cl | |
| run: ${{ matrix.setupCl }} | |
| - name: Build rpm Package | |
| if: ${{ matrix.runtime == 'linux-fedora-x64' }} | |
| env: | |
| # 7-Project Supabase Configuration | |
| SUPABASE_AUTH_URL: ${{ secrets.SUPABASE_AUTH_URL }} | |
| SUPABASE_AUTH_KEY: ${{ secrets.SUPABASE_AUTH_KEY }} | |
| SUPABASE_READING_URL: ${{ secrets.SUPABASE_READING_URL }} | |
| SUPABASE_READING_KEY: ${{ secrets.SUPABASE_READING_KEY }} | |
| SUPABASE_LIBRARY_URL: ${{ secrets.SUPABASE_LIBRARY_URL }} | |
| SUPABASE_LIBRARY_KEY: ${{ secrets.SUPABASE_LIBRARY_KEY }} | |
| SUPABASE_BOOK_REVIEWS_URL: ${{ secrets.SUPABASE_BOOK_REVIEWS_URL }} | |
| SUPABASE_BOOK_REVIEWS_KEY: ${{ secrets.SUPABASE_BOOK_REVIEWS_KEY }} | |
| SUPABASE_CHAPTER_REVIEWS_URL: ${{ secrets.SUPABASE_CHAPTER_REVIEWS_URL }} | |
| SUPABASE_CHAPTER_REVIEWS_KEY: ${{ secrets.SUPABASE_CHAPTER_REVIEWS_KEY }} | |
| SUPABASE_BADGES_URL: ${{ secrets.SUPABASE_BADGES_URL }} | |
| SUPABASE_BADGES_KEY: ${{ secrets.SUPABASE_BADGES_KEY }} | |
| SUPABASE_ANALYTICS_URL: ${{ secrets.SUPABASE_ANALYTICS_URL }} | |
| SUPABASE_ANALYTICS_KEY: ${{ secrets.SUPABASE_ANALYTICS_KEY }} | |
| # Cloudflare R2 Storage | |
| R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
| R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_BUCKET_NAME: ${{ secrets.R2_BUCKET_NAME }} | |
| R2_PUBLIC_URL: ${{ secrets.R2_PUBLIC_URL }} | |
| # Cloudflare D1 + R2 Community Translations | |
| COMMUNITY_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.COMMUNITY_CLOUDFLARE_ACCOUNT_ID }} | |
| COMMUNITY_CLOUDFLARE_API_TOKEN: ${{ secrets.COMMUNITY_CLOUDFLARE_API_TOKEN }} | |
| COMMUNITY_D1_DATABASE_ID: ${{ secrets.COMMUNITY_D1_DATABASE_ID }} | |
| COMMUNITY_R2_BUCKET_NAME: ${{ secrets.COMMUNITY_R2_BUCKET_NAME }} | |
| COMMUNITY_R2_PUBLIC_URL: ${{ secrets.COMMUNITY_R2_PUBLIC_URL }} | |
| run: | | |
| docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \ | |
| -e SUPABASE_AUTH_URL="${{ secrets.SUPABASE_AUTH_URL }}" \ | |
| -e SUPABASE_AUTH_KEY="${{ secrets.SUPABASE_AUTH_KEY }}" \ | |
| -e SUPABASE_READING_URL="${{ secrets.SUPABASE_READING_URL }}" \ | |
| -e SUPABASE_READING_KEY="${{ secrets.SUPABASE_READING_KEY }}" \ | |
| -e SUPABASE_LIBRARY_URL="${{ secrets.SUPABASE_LIBRARY_URL }}" \ | |
| -e SUPABASE_LIBRARY_KEY="${{ secrets.SUPABASE_LIBRARY_KEY }}" \ | |
| -e SUPABASE_BOOK_REVIEWS_URL="${{ secrets.SUPABASE_BOOK_REVIEWS_URL }}" \ | |
| -e SUPABASE_BOOK_REVIEWS_KEY="${{ secrets.SUPABASE_BOOK_REVIEWS_KEY }}" \ | |
| -e SUPABASE_CHAPTER_REVIEWS_URL="${{ secrets.SUPABASE_CHAPTER_REVIEWS_URL }}" \ | |
| -e SUPABASE_CHAPTER_REVIEWS_KEY="${{ secrets.SUPABASE_CHAPTER_REVIEWS_KEY }}" \ | |
| -e SUPABASE_BADGES_URL="${{ secrets.SUPABASE_BADGES_URL }}" \ | |
| -e SUPABASE_BADGES_KEY="${{ secrets.SUPABASE_BADGES_KEY }}" \ | |
| -e SUPABASE_ANALYTICS_URL="${{ secrets.SUPABASE_ANALYTICS_URL }}" \ | |
| -e SUPABASE_ANALYTICS_KEY="${{ secrets.SUPABASE_ANALYTICS_KEY }}" \ | |
| -e R2_ACCOUNT_ID="${{ secrets.R2_ACCOUNT_ID }}" \ | |
| -e R2_ACCESS_KEY_ID="${{ secrets.R2_ACCESS_KEY_ID }}" \ | |
| -e R2_SECRET_ACCESS_KEY="${{ secrets.R2_SECRET_ACCESS_KEY }}" \ | |
| -e R2_BUCKET_NAME="${{ secrets.R2_BUCKET_NAME }}" \ | |
| -e R2_PUBLIC_URL="${{ secrets.R2_PUBLIC_URL }}" \ | |
| -e COMMUNITY_CLOUDFLARE_ACCOUNT_ID="${{ secrets.COMMUNITY_CLOUDFLARE_ACCOUNT_ID }}" \ | |
| -e COMMUNITY_CLOUDFLARE_API_TOKEN="${{ secrets.COMMUNITY_CLOUDFLARE_API_TOKEN }}" \ | |
| -e COMMUNITY_D1_DATABASE_ID="${{ secrets.COMMUNITY_D1_DATABASE_ID }}" \ | |
| -e COMMUNITY_R2_BUCKET_NAME="${{ secrets.COMMUNITY_R2_BUCKET_NAME }}" \ | |
| -e COMMUNITY_R2_PUBLIC_URL="${{ secrets.COMMUNITY_R2_PUBLIC_URL }}" \ | |
| fedora:latest bash -c " | |
| dnf install -y rpm-build git curl && | |
| curl -L -o /tmp/zulu21.tar.gz 'https://cdn.azul.com/zulu/bin/zulu21.38.21-ca-jdk21.0.5-linux_x64.tar.gz' && | |
| tar -xzf /tmp/zulu21.tar.gz -C /opt/ && | |
| export JAVA_HOME=/opt/zulu21.38.21-ca-jdk21.0.5-linux_x64 && | |
| export PATH=\$JAVA_HOME/bin:\$PATH && | |
| java -version && | |
| ./gradlew ${{ matrix.build }} --stacktrace | |
| " | |
| - name: Build | |
| if: ${{ matrix.runtime != 'linux-fedora-x64' }} | |
| uses: gradle/gradle-build-action@v2 | |
| env: | |
| # 7-Project Supabase Configuration | |
| SUPABASE_AUTH_URL: ${{ secrets.SUPABASE_AUTH_URL }} | |
| SUPABASE_AUTH_KEY: ${{ secrets.SUPABASE_AUTH_KEY }} | |
| SUPABASE_READING_URL: ${{ secrets.SUPABASE_READING_URL }} | |
| SUPABASE_READING_KEY: ${{ secrets.SUPABASE_READING_KEY }} | |
| SUPABASE_LIBRARY_URL: ${{ secrets.SUPABASE_LIBRARY_URL }} | |
| SUPABASE_LIBRARY_KEY: ${{ secrets.SUPABASE_LIBRARY_KEY }} | |
| SUPABASE_BOOK_REVIEWS_URL: ${{ secrets.SUPABASE_BOOK_REVIEWS_URL }} | |
| SUPABASE_BOOK_REVIEWS_KEY: ${{ secrets.SUPABASE_BOOK_REVIEWS_KEY }} | |
| SUPABASE_CHAPTER_REVIEWS_URL: ${{ secrets.SUPABASE_CHAPTER_REVIEWS_URL }} | |
| SUPABASE_CHAPTER_REVIEWS_KEY: ${{ secrets.SUPABASE_CHAPTER_REVIEWS_KEY }} | |
| SUPABASE_BADGES_URL: ${{ secrets.SUPABASE_BADGES_URL }} | |
| SUPABASE_BADGES_KEY: ${{ secrets.SUPABASE_BADGES_KEY }} | |
| SUPABASE_ANALYTICS_URL: ${{ secrets.SUPABASE_ANALYTICS_URL }} | |
| SUPABASE_ANALYTICS_KEY: ${{ secrets.SUPABASE_ANALYTICS_KEY }} | |
| # Cloudflare R2 Storage | |
| R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
| R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_BUCKET_NAME: ${{ secrets.R2_BUCKET_NAME }} | |
| R2_PUBLIC_URL: ${{ secrets.R2_PUBLIC_URL }} | |
| # Cloudflare D1 + R2 Community Translations | |
| COMMUNITY_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.COMMUNITY_CLOUDFLARE_ACCOUNT_ID }} | |
| COMMUNITY_CLOUDFLARE_API_TOKEN: ${{ secrets.COMMUNITY_CLOUDFLARE_API_TOKEN }} | |
| COMMUNITY_D1_DATABASE_ID: ${{ secrets.COMMUNITY_D1_DATABASE_ID }} | |
| COMMUNITY_R2_BUCKET_NAME: ${{ secrets.COMMUNITY_R2_BUCKET_NAME }} | |
| COMMUNITY_R2_PUBLIC_URL: ${{ secrets.COMMUNITY_R2_PUBLIC_URL }} | |
| with: | |
| arguments: > | |
| ${{ matrix.build }} | |
| # ==================== Summary Job ==================== | |
| check-summary: | |
| name: Check Summary | |
| runs-on: ubuntu-latest | |
| needs: [BuildBinaries] | |
| if: always() | |
| steps: | |
| - name: Check results | |
| run: | | |
| echo "=== Check Summary ===" | |
| # echo "iOS Build: ${{ needs.ios-build.result }}" | |
| echo "Build: ${{ needs.BuildBinaries.result }}" | |
| - name: Comment PR with results | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: |- | |
| # const iosBuild = '${{ needs.ios-build.result }}'; | |
| const build = '${{ needs.BuildBinaries.result }}'; | |
| const getEmoji = (result) => result === 'success' ? '✅' : result === 'failure' ? '❌' : '⚠️'; | |
| const body = `## Check Results Summary | |
| | Check | Status | | |
| |-------|--------| | |
| | All Module Tests | ${getEmoji(allTests)} ${allTests} | | |
| # | iOS Build | ${getEmoji(iosBuild)} ${iosBuild} | | |
| | Build | ${getEmoji(build)} ${build} | | |
| ### Tests Include: | |
| - All domain module tests | |
| - All data module tests | |
| - All presentation module tests | |
| - Database migration tests | |
| - Chapter cache and persistence tests | |
| - Download service tests | |
| - Reading timer tests | |
| - iOS framework compilation | |
| `; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: body | |
| }); |