hezarfen_mobile
Clone
https://git.tahinli.com/archive/hezarfen_mobile.git
0 watching0 forksRust5.5 MiB3424bc6Burak Boduroğlu3 months ago13 commits
| 1 | name: build |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | pull_request: |
| 7 | workflow_dispatch: |
| 8 | |
| 9 | env: |
| 10 | # Release artifacts point at production; dev builds fall back to localhost. |
| 11 | HEZARFEN_BACKEND_ORIGIN: ${{ vars.HEZARFEN_BACKEND_ORIGIN }} |
| 12 | |
| 13 | jobs: |
| 14 | proxy-tests: |
| 15 | runs-on: ubuntu-latest |
| 16 | steps: |
| 17 | # The proxy's unit tests need no frontend bundle, so the private |
| 18 | # submodule is not checked out here — this job stays runnable on forks. |
| 19 | - uses: actions/checkout@v4 |
| 20 | - uses: dtolnay/rust-toolchain@stable |
| 21 | - uses: Swatinem/rust-cache@v2 |
| 22 | with: |
| 23 | workspaces: src-tauri |
| 24 | - name: System deps for tauri |
| 25 | run: | |
| 26 | sudo apt-get update |
| 27 | sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev |
| 28 | - run: mkdir -p frontend/dist && echo '<!doctype html>' > frontend/dist/index.html |
| 29 | - run: cargo test --manifest-path src-tauri/Cargo.toml |
| 30 | - run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings |
| 31 | - run: cargo fmt --manifest-path src-tauri/Cargo.toml --check |
| 32 | |
| 33 | android: |
| 34 | runs-on: ubuntu-latest |
| 35 | steps: |
| 36 | - uses: actions/checkout@v4 |
| 37 | with: |
| 38 | submodules: recursive |
| 39 | # hezarfen_frontend is private; the default GITHUB_TOKEN cannot read it. |
| 40 | token: ${{ secrets.SUBMODULE_TOKEN }} |
| 41 | - uses: oven-sh/setup-bun@v2 |
| 42 | - uses: actions/setup-java@v4 |
| 43 | with: |
| 44 | distribution: temurin |
| 45 | java-version: '17' |
| 46 | - uses: android-actions/setup-android@v3 |
| 47 | - name: Install NDK |
| 48 | run: | |
| 49 | sdkmanager "ndk;27.2.12479018" "platforms;android-35" "build-tools;35.0.0" |
| 50 | echo "NDK_HOME=$ANDROID_HOME/ndk/27.2.12479018" >> "$GITHUB_ENV" |
| 51 | - uses: dtolnay/rust-toolchain@stable |
| 52 | with: |
| 53 | targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android |
| 54 | - uses: Swatinem/rust-cache@v2 |
| 55 | with: |
| 56 | workspaces: src-tauri |
| 57 | - run: bun install --cwd frontend --frozen-lockfile |
| 58 | - run: cargo install tauri-cli --version "^2" --locked |
| 59 | - run: cargo tauri android build --apk |
| 60 | - uses: actions/upload-artifact@v4 |
| 61 | with: |
| 62 | name: hezarfen-android |
| 63 | path: src-tauri/gen/android/app/build/outputs/apk/**/*.apk |
| 64 | |
| 65 | ios: |
| 66 | # iOS builds need Xcode, so they cannot run alongside the Android job. |
| 67 | runs-on: macos-14 |
| 68 | steps: |
| 69 | - uses: actions/checkout@v4 |
| 70 | with: |
| 71 | submodules: recursive |
| 72 | token: ${{ secrets.SUBMODULE_TOKEN }} |
| 73 | - uses: oven-sh/setup-bun@v2 |
| 74 | - uses: dtolnay/rust-toolchain@stable |
| 75 | with: |
| 76 | targets: aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios |
| 77 | - uses: Swatinem/rust-cache@v2 |
| 78 | with: |
| 79 | workspaces: src-tauri |
| 80 | - run: bun install --cwd frontend --frozen-lockfile |
| 81 | - run: cargo install tauri-cli --version "^2" --locked |
| 82 | # Unsigned: signing needs the App Store certificate and a provisioning |
| 83 | # profile for co.hezarfen.app, which are not available to CI yet. |
| 84 | - run: cargo tauri ios build --ci --export-method debugging |
| 85 | - uses: actions/upload-artifact@v4 |
| 86 | with: |
| 87 | name: hezarfen-ios |
| 88 | path: src-tauri/gen/apple/build/**/*.ipa |