fixup! Upload Universal #547
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: CI | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: '0' | |
| - name: Apply patches | |
| run : | | |
| pushd EhViewer | |
| bash ../patches/apply.sh | |
| mv * ../ | |
| mv .editorconfig ../ | |
| popd | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Install Rust Toolchain | |
| run: rustup target add armv7-linux-androideabi | |
| - 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@v5 | |
| with: | |
| cache-read-only: true | |
| - name: Check build-logic | |
| run: ./gradlew :build-logic:convention:check | |
| - name: Spotless Check | |
| run: ./gradlew spotlessCheck | |
| - name: Lint Check | |
| run: ./gradlew lintMarshmallowRelease | |
| default: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: '0' | |
| - name: Apply patches | |
| run : | | |
| pushd EhViewer | |
| bash ../patches/apply.sh | |
| mv * ../ | |
| popd | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Install Rust Toolchain | |
| run: rustup target add armv7-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@v5 | |
| with: | |
| cache-encryption-key: ${{ secrets.GradleEncryptionKey }} | |
| - name: CMake Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: app/.cxx | |
| key: cmake-default-${{ hashFiles('rust-toolchain.toml', 'settings.gradle.kts', 'app/src/main/cpp/CMakeLists.txt', 'app/src/main/rust/Cargo.lock') }} | |
| restore-keys: cmake-default- | |
| # https://github.com/mikepenz/AboutLibraries/issues/1225 | |
| - name: Generate aboutlibraries.json | |
| run: ./gradlew :app:prepareLibraryDefinitionsDefaultRelease --rerun | |
| - name: Build | |
| run: ./gradlew assembleDefaultRelease | |
| - name: Upload ARM64 | |
| uses: actions/upload-artifact@v5 | |
| 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@v5 | |
| 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@v5 | |
| with: | |
| name: default-armeabi-v7a-${{ github.sha }} | |
| path: app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk | |
| - name: Upload Universal | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: default-universal-${{ github.sha }} | |
| path: app/build/outputs/apk/default/release/app-default-universal-release.apk | |
| - name: Upload mapping | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: default-mapping-${{ github.sha }} | |
| path: app/build/outputs/mapping/defaultRelease | |
| - name: Upload native debug symbols | |
| uses: actions/upload-artifact@v5 | |
| 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 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: '0' | |
| - name: Apply patches | |
| run : | | |
| pushd EhViewer | |
| bash ../patches/apply.sh | |
| mv * ../ | |
| popd | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Install Rust Toolchain | |
| run: rustup target add armv7-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@v5 | |
| with: | |
| cache-encryption-key: ${{ secrets.GradleEncryptionKey }} | |
| - name: CMake Cache | |
| uses: actions/cache@v4 | |
| 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- | |
| # https://github.com/mikepenz/AboutLibraries/issues/1225 | |
| - name: Generate aboutlibraries.json | |
| run: ./gradlew :app:prepareLibraryDefinitionsMarshmallowRelease --rerun | |
| - name: Build | |
| run: ./gradlew assembleMarshmallowRelease | |
| - name: Upload ARM64 | |
| uses: actions/upload-artifact@v5 | |
| 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@v5 | |
| 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@v5 | |
| with: | |
| name: marshmallow-armeabi-v7a-${{ github.sha }} | |
| path: app/build/outputs/apk/marshmallow/release/app-marshmallow-armeabi-v7a-release.apk | |
| - name: Upload Universal | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: marshmallow-universal-${{ github.sha }} | |
| path: app/build/outputs/apk/marshmallow/release/app-marshmallow-universal-release.apk | |
| - name: Upload mapping | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: marshmallow-mapping-${{ github.sha }} | |
| path: app/build/outputs/mapping/marshmallowRelease | |
| - name: Upload native debug symbols | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: marshmallow-native-debug-symbols-${{ github.sha }} | |
| path: app/build/outputs/native-debug-symbols/marshmallowRelease/native-debug-symbols.zip |