From ec11593ab190a68a6d11715d9a5d471a7c5ec0e4 Mon Sep 17 00:00:00 2001 From: PancakeTAS Date: Thu, 24 Jul 2025 14:46:46 +0200 Subject: [PATCH] ui: workflow --- .github/workflows/update-ui.yml | 64 +++++++++++++++++++++++++++++++++ .gitignore | 3 ++ ui/Cargo.toml | 20 ++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-ui.yml diff --git a/.github/workflows/update-ui.yml b/.github/workflows/update-ui.yml new file mode 100644 index 0000000..5c9c879 --- /dev/null +++ b/.github/workflows/update-ui.yml @@ -0,0 +1,64 @@ +name: Update lsfg-vk-ui app image +on: + push: + branches: ["feat/ui"] + +jobs: + update-ui: + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: Prepare cache for pacman packages + uses: actions/cache@v4 + with: + path: /var/cache/pacman/pkg + key: archlinux-pacman-cache + - name: Prepare cache for rustup + uses: actions/cache@v4 + with: + path: /root/.rustup + key: archlinux-rustup-cache + - name: Prepare cache for cargo + uses: actions/cache@v4 + with: + path: /root/.cargo + key: archlinux-cargo-cache + - name: Install build dependencies + run: | + pacman -Syu --noconfirm \ + base-devel git \ + clang llvm \ + rustup gcc \ + cmake ninja \ + vulkan-headers vulkan-icd-loader \ + xorg wayland wayland-protocols mesa-utils \ + wget gdk-pixbuf2 gtk4 libadwaita fuse + - name: Update Rust toolchain + run: | + rustup default stable + - name: Update Cargo tools + run: | + cargo install cargo-appimage + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Grab continuous appimagetool + run: | + wget -O appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage + chmod +x appimagetool + ./appimagetool --appimage-extract + mv squashfs-root/usr/bin/* ui/ + - name: Build UI with Cargo + run: | + cd ui + PATH=$PATH:$PWD cargo appimage + cd .. + mv ui/target/appimage/ui.AppImage lsfg-vk-ui.AppImage + - name: Upload lsfg-vk artifact + uses: actions/upload-artifact@v4 + with: + name: lsfg-vk-ui + path: | + lsfg-vk-ui.AppImage diff --git a/.gitignore b/.gitignore index 682effd..64c3ae1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ # cargo files /ui/target +/ui/libs +/ui/appimagetool +/ui/icon.png # ide/lsp files /.zed diff --git a/ui/Cargo.toml b/ui/Cargo.toml index 5d7db0f..ec0c05f 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ui" version = "0.0.1" -edition = "2024" +edition = "2021" [dependencies] gtk = { version = "0.10.0", package = "gtk4", features = ["v4_10"] } @@ -14,3 +14,21 @@ proc-maps = "0.4.0" [build-dependencies] glib-build-tools = "0.21.0" + +[package.metadata.appimage] +auto_link = true +auto_link_exclude_list = [ + "ld-linux*", + "libc.so*", + "libm.so*", + "libresolv.so*", + "libstdc++.so*", + "libxcb.so*", + "libX11.so*", + "libwayland-client.so*", + "libfontconfig.so*", + "libfreetype.so*", + "libexpat.so*", + "libgcc_s.so*", + "libz.so*" +]