-
Notifications
You must be signed in to change notification settings - Fork 2
141 lines (116 loc) · 3.92 KB
/
build.yml
File metadata and controls
141 lines (116 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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_check_hardened_apk.py \
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
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