11name : Install Linux deps
2- description : Install build and runtime deps for Tauri app on Ubuntu
2+ description : Install build and runtime deps for Tauri app on Ubuntu (with caching)
33inputs :
44 e2e :
55 description : Include E2E desktop deps (webkit2gtk-driver, xvfb, gnome-keyring)
@@ -12,22 +12,39 @@ inputs:
1212runs :
1313 using : composite
1414 steps :
15- - name : Install Linux deps
15+ # Cache apt packages to avoid re-downloading on every run
16+ - name : Cache apt packages (base)
17+ uses : awalsh128/cache-apt-pkgs-action@latest
18+ with :
19+ packages : build-essential pkg-config libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
20+ version : 1.0
21+
22+ - name : Cache apt packages (E2E)
23+ if : ${{ inputs.e2e == 'true' }}
24+ uses : awalsh128/cache-apt-pkgs-action@latest
25+ with :
26+ packages : webkit2gtk-driver xvfb gnome-keyring gsettings-desktop-schemas dbus-x11 at-spi2-core libglib2.0-bin
27+ version : 1.2
28+
29+ # Compile gsettings schemas (required after restore from cache)
30+ - name : Compile gsettings schemas
31+ if : ${{ inputs.e2e == 'true' }}
1632 shell : bash
1733 run : |
18- BASE_DEPS="build-essential pkg-config libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev"
19- E2E_DEPS="webkit2gtk-driver xvfb gnome-keyring"
20- sudo apt-get update
21- if [ "${{ inputs.e2e }}" = "true" ]; then
22- sudo apt-get install -y $BASE_DEPS $E2E_DEPS
23- else
24- sudo apt-get install -y $BASE_DEPS
25- fi
26- if [ "${{ inputs.verify_glib }}" = "true" ]; then
27- echo "=== Verifying glib-2.0 installation ==="
28- dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
29- find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
30- pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
31- pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
32- fi
33- echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
34+ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ || true
35+ # Verify the schema is available
36+ gsettings list-schemas | grep -q org.gnome.system.proxy && echo "✓ org.gnome.system.proxy schema available" || echo "⚠ schema not found"
37+
38+ - name : Verify glib installation
39+ if : ${{ inputs.verify_glib == 'true' }}
40+ shell : bash
41+ run : |
42+ echo "=== Verifying glib-2.0 installation ==="
43+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
44+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
45+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
46+ pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
47+
48+ - name : Set PKG_CONFIG_PATH
49+ shell : bash
50+ run : echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
0 commit comments