diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.forgejo/ISSUE_TEMPLATE/bug-report.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/bug-report.yml rename to .forgejo/ISSUE_TEMPLATE/bug-report.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.forgejo/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .forgejo/ISSUE_TEMPLATE/config.yml diff --git a/.github/workflows/baseline-profile.yml b/.forgejo/workflows/baseline-profile.yml similarity index 67% rename from .github/workflows/baseline-profile.yml rename to .forgejo/workflows/baseline-profile.yml index 6f34d4e14..0186f4962 100644 --- a/.github/workflows/baseline-profile.yml +++ b/.forgejo/workflows/baseline-profile.yml @@ -13,17 +13,8 @@ on: jobs: baseline-profile: - runs-on: ubuntu-latest + runs-on: nekomoee steps: - - name: Free disk space - run: rm -rf $AGENT_TOOLSDIRECTORY - - - name: Enable KVM group perms - 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: Checkout uses: actions/checkout@v6 @@ -33,11 +24,17 @@ jobs: distribution: temurin java-version-file: .java-version - - name: Install Rust Toolchain - run: rustup target add thumbv7neon-linux-androideabi + - name: Setup Android SDK + uses: https://github.com/android-actions/setup-android@v4 + + - name: Setup Rust + uses: https://github.com/dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2026-08-22 + targets: aarch64-linux-android, thumbv7neon-linux-androideabi - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: https://github.com/Swatinem/rust-cache@v2 with: workspaces: "./app/src/main/rust" @@ -59,7 +56,7 @@ jobs: - name: Upload reports if: failure() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v3 with: name: reports path: benchmark/build/reports diff --git a/.github/workflows/ci.yml b/.forgejo/workflows/ci.yml similarity index 50% rename from .github/workflows/ci.yml rename to .forgejo/workflows/ci.yml index d0803ed25..652956b68 100644 --- a/.github/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: check: - runs-on: ubuntu-latest + runs-on: nekomoee steps: - name: Checkout uses: actions/checkout@v6 @@ -20,11 +20,17 @@ jobs: distribution: temurin java-version-file: .java-version - - name: Install Rust Toolchain - run: rustup target add thumbv7neon-linux-androideabi + - name: Setup Android SDK + uses: https://github.com/android-actions/setup-android@v4 + + - name: Setup Rust + uses: https://github.com/dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2026-08-22 + targets: aarch64-linux-android, thumbv7neon-linux-androideabi - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: https://github.com/Swatinem/rust-cache@v2 with: workspaces: "./app/src/main/rust" shared-key: ${{ runner.os }} @@ -49,10 +55,10 @@ jobs: run: ./gradlew spotlessCheck - name: Lint Check - run: ./gradlew lintMarshmallowRelease + run: ./gradlew lintDefaultRelease default: - runs-on: ubuntu-latest + runs-on: nekomoee steps: - name: Checkout uses: actions/checkout@v6 @@ -63,11 +69,17 @@ jobs: distribution: temurin java-version-file: .java-version - - name: Install Rust Toolchain - run: rustup target add thumbv7neon-linux-androideabi + - name: Setup Android SDK + uses: https://github.com/android-actions/setup-android@v4 + + - name: Setup Rust + uses: https://github.com/dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2026-08-22 + targets: aarch64-linux-android, thumbv7neon-linux-androideabi - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: https://github.com/Swatinem/rust-cache@v2 with: workspaces: "./app/src/main/rust" shared-key: ${{ runner.os }} @@ -89,100 +101,31 @@ jobs: run: ./gradlew assembleDefaultRelease - name: Upload ARM64 - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v3 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@v7 + uses: actions/upload-artifact@v3 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@v7 + uses: actions/upload-artifact@v3 with: name: default-armeabi-v7a-${{ github.sha }} path: app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk - name: Upload mapping - if: always() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v3 with: name: default-mapping-${{ github.sha }} path: app/build/outputs/mapping/defaultRelease/*.txt - name: Upload native debug symbols - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v3 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@v6 - - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version-file: .java-version - - - name: Install Rust Toolchain - run: rustup target add thumbv7neon-linux-androideabi - - - 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@v6 - with: - cache-encryption-key: ${{ secrets.GradleEncryptionKey }} - - - name: CMake Cache - uses: actions/cache@v5 - with: - path: app/.cxx - key: cmake-marshmallow-${{ hashFiles('rust-toolchain.toml', 'settings.gradle.kts', 'app/src/main/cpp/CMakeLists.txt', 'app/src/main/rust/Cargo.lock') }} - restore-keys: cmake-marshmallow- - - - name: Build - run: ./gradlew assembleMarshmallowRelease - - - name: Upload ARM64 - uses: actions/upload-artifact@v7 - 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@v7 - 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@v7 - with: - name: marshmallow-armeabi-v7a-${{ github.sha }} - path: app/build/outputs/apk/marshmallow/release/app-marshmallow-armeabi-v7a-release.apk - - - name: Upload mapping - if: always() - uses: actions/upload-artifact@v7 - with: - name: marshmallow-mapping-${{ github.sha }} - path: app/build/outputs/mapping/marshmallowRelease/*.txt - - - name: Upload native debug symbols - uses: actions/upload-artifact@v7 - with: - name: marshmallow-native-debug-symbols-${{ github.sha }} - path: app/build/outputs/native-debug-symbols/marshmallowRelease/native-debug-symbols.zip diff --git a/.forgejo/workflows/releases.yml b/.forgejo/workflows/releases.yml new file mode 100644 index 000000000..54eb8e938 --- /dev/null +++ b/.forgejo/workflows/releases.yml @@ -0,0 +1,79 @@ +name: Releases + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: nekomoee + steps: + - name: Free disk space + run: rm -rf $AGENT_TOOLSDIRECTORY + + - name: Enable KVM group perms + 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: Checkout + uses: actions/checkout@v6 + + - name: Setup Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version-file: .java-version + + - name: Setup Rust + uses: https://github.com/dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2026-08-22 + targets: aarch64-linux-android, thumbv7neon-linux-androideabi + + - name: Rust Cache + uses: https://github.com/Swatinem/rust-cache@v2 + with: + workspaces: "./app/src/main/rust" + + - name: CMake Cache + uses: actions/cache/restore@v5 + with: + path: app/.cxx + key: cmake- + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v6 + with: + cache-encryption-key: ${{ secrets.GradleEncryptionKey }} + cache-read-only: true + + - name: Generate Baseline Profile + run: ./gradlew generateBaselineProfile + -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + -Prelease + + - name: Build + run: ./gradlew assembleRelease + -Prelease + + - name: Rename Apks + run: | + mkdir release + mv app/build/outputs/apk/default/release/app-default-universal-release.apk release/EhViewer-${{ github.ref_name }}-default-universal.apk + mv app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk release/EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk + mv app/build/outputs/apk/default/release/app-default-x86_64-release.apk release/EhViewer-${{ github.ref_name }}-default-x86_64.apk + mv app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk release/EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk + mv app/build/outputs/mapping/defaultRelease/mapping.txt release/EhViewer-${{ github.ref_name }}-default-mapping.txt + mv app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip release/EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip + + - name: Releases + uses: actions/forgejo-release@v2 + with: + direction: upload + url: https://codeberg.org + repo: EhViewer/EhViewer + release-dir: release + body: Bump Version diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml deleted file mode 100644 index 5582168fa..000000000 --- a/.github/workflows/lock-threads.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 'Lock Threads' - -on: - schedule: - - cron: '0 8 * * *' - workflow_dispatch: - -permissions: - issues: write - -concurrency: - group: lock-threads - -jobs: - action: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v6 - with: - issue-inactive-days: '1' - process-only: 'issues' diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml deleted file mode 100644 index ec681d0ca..000000000 --- a/.github/workflows/releases.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Releases - -on: - push: - tags: - - "*" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Free disk space - run: rm -rf $AGENT_TOOLSDIRECTORY - - - name: Enable KVM group perms - 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: Checkout - uses: actions/checkout@v6 - - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version-file: .java-version - - - name: Install Rust Toolchain - run: rustup target add thumbv7neon-linux-androideabi - - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - with: - workspaces: "./app/src/main/rust" - - - name: CMake Cache - uses: actions/cache/restore@v5 - with: - path: app/.cxx - key: cmake- - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v6 - with: - cache-encryption-key: ${{ secrets.GradleEncryptionKey }} - cache-read-only: true - - - name: Generate Baseline Profile - run: ./gradlew generateBaselineProfile - -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" - -Prelease - - - name: Build - run: ./gradlew assembleRelease - -Prelease - - - name: Rename Apks - run: | - mv app/build/outputs/apk/default/release/app-default-universal-release.apk EhViewer-${{ github.ref_name }}-default-universal.apk - mv app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk - mv app/build/outputs/apk/default/release/app-default-x86_64-release.apk EhViewer-${{ github.ref_name }}-default-x86_64.apk - mv app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk - mv app/build/outputs/mapping/defaultRelease/mapping.txt EhViewer-${{ github.ref_name }}-default-mapping.txt - mv app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip - - mv app/build/outputs/apk/marshmallow/release/app-marshmallow-universal-release.apk EhViewer-${{ github.ref_name }}-marshmallow-universal.apk - mv app/build/outputs/apk/marshmallow/release/app-marshmallow-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-arm64-v8a.apk - mv app/build/outputs/apk/marshmallow/release/app-marshmallow-x86_64-release.apk EhViewer-${{ github.ref_name }}-marshmallow-x86_64.apk - mv app/build/outputs/apk/marshmallow/release/app-marshmallow-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-armeabi-v7a.apk - mv app/build/outputs/mapping/marshmallowRelease/mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-mapping.txt - mv app/build/outputs/native-debug-symbols/marshmallowRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-native-debug-symbols.zip - - - name: Releases - uses: softprops/action-gh-release@v3 - with: - body: Bump Version - files: | - EhViewer-${{ github.ref_name }}-default-universal.apk - EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk - EhViewer-${{ github.ref_name }}-default-x86_64.apk - EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk - EhViewer-${{ github.ref_name }}-default-mapping.txt - EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip - - EhViewer-${{ github.ref_name }}-marshmallow-universal.apk - EhViewer-${{ github.ref_name }}-marshmallow-arm64-v8a.apk - EhViewer-${{ github.ref_name }}-marshmallow-x86_64.apk - EhViewer-${{ github.ref_name }}-marshmallow-armeabi-v7a.apk - EhViewer-${{ github.ref_name }}-marshmallow-mapping.txt - EhViewer-${{ github.ref_name }}-marshmallow-native-debug-symbols.zip diff --git a/gradle.properties b/gradle.properties index 97fd3083e..41f58cffb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m -org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 -XX:+UseParallelGC +org.gradle.jvmargs=-Xmx2G -Dfile.encoding=UTF-8 -XX:+UseParallelGC +kotlin.daemon.jvm.options=-Xmx2G # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit