fix: avoid launching loader shell app without launcher #12
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: Build CrabShell | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| core-build: | |
| name: Core Build (CLI/Loader) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Rust Toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-ndk | |
| run: cargo install cargo-ndk --locked | |
| - name: Run fast CLI tests | |
| run: | | |
| python3 -m unittest \ | |
| scripts/test_pack_main_helpers.py \ | |
| scripts/test_pack_skip_build.py \ | |
| scripts/test_pack_build_flow.py \ | |
| scripts/test_pack_aab_conversion.py \ | |
| scripts/test_workflow_fast_checks.py | |
| cargo test --manifest-path packer/Cargo.toml | |
| cargo test --manifest-path loader/app/src/main/rust/Cargo.toml | |
| - name: Build and Verify | |
| run: | | |
| chmod +x verify.sh | |
| ./verify.sh | |
| emulator-smoke: | |
| name: Emulator Startup Smoke | |
| runs-on: ubuntu-latest | |
| needs: core-build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Rust Toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: loader/app/src/main/rust | |
| - name: Install cargo-ndk | |
| run: cargo install cargo-ndk --locked | |
| - name: Run connected startup smoke test | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 30 | |
| target: google_apis | |
| arch: x86_64 | |
| profile: Nexus 6 | |
| disable-animations: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| script: | | |
| bash scripts/ci_emulator_smoke.sh | |
| gui-package: | |
| name: GUI Package (${{ matrix.platform.name }}) | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: macOS | |
| os: macos-latest | |
| tauri_bundles: app | |
| artifact_name: CrabShell-macos | |
| artifact_paths: | | |
| crabshell-gui/src-tauri/target/release/bundle/macos/CrabShell.app | |
| crabshell-gui/src-tauri/target/release/bundle/dmg/*.dmg | |
| - name: Linux | |
| os: ubuntu-22.04 | |
| tauri_bundles: deb,appimage | |
| artifact_name: CrabShell-linux | |
| artifact_paths: | | |
| crabshell-gui/src-tauri/target/release/bundle/deb/*.deb | |
| crabshell-gui/src-tauri/target/release/bundle/appimage/*.AppImage | |
| - name: Windows | |
| os: windows-latest | |
| tauri_bundles: msi,nsis | |
| artifact_name: CrabShell-windows | |
| artifact_paths: | | |
| crabshell-gui/src-tauri/target/release/bundle/msi/*.msi | |
| crabshell-gui/src-tauri/target/release/bundle/nsis/*.exe | |
| defaults: | |
| run: | |
| working-directory: crabshell-gui | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux GUI build deps | |
| if: matrix.platform.os == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: crabshell-gui/package-lock.json | |
| - name: Install Rust Toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: crabshell-gui/src-tauri | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run check | |
| - name: Build renderer | |
| run: npm run build:renderer | |
| - name: Build Tauri bundles | |
| run: npx tauri build --bundles ${{ matrix.platform.tauri_bundles }} | |
| - name: Build DMG (macOS only) | |
| if: matrix.platform.os == 'macos-latest' | |
| run: npm run build:dmg | |
| - name: Upload GUI artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform.artifact_name }} | |
| path: ${{ matrix.platform.artifact_paths }} | |
| if-no-files-found: error |