Skip to content

Commit a69fd87

Browse files
authored
add glxgears+vkcube demo (#77)
1 parent 7b19bad commit a69fd87

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

.github/workflows/build-demo.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build Demo
2+
concurrency:
3+
group: build-${{ github.ref }}
4+
cancel-in-progress: true
5+
6+
on:
7+
schedule:
8+
- cron: "0 7 1/30 * *"
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
build:
13+
name: "${{ matrix.name }} (${{ matrix.arch }})"
14+
runs-on: ${{ matrix.runs-on }}
15+
strategy:
16+
matrix:
17+
include:
18+
- runs-on: ubuntu-latest
19+
name: Build AppImage
20+
arch: x86_64
21+
- runs-on: ubuntu-24.04-arm
22+
name: Build AppImage
23+
arch: aarch64
24+
container: ghcr.io/pkgforge-dev/archlinux:latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Make AppImage
29+
run: sh ./useful-tools/demo/vkcube-glxgears-appimage.sh
30+
31+
- name: Upload artifact
32+
uses: actions/upload-artifact@v4.6.2
33+
with:
34+
name: AppImage-${{ matrix.arch }}
35+
path: dist
36+
37+
release:
38+
if: ${{ github.ref_name == 'main' }}
39+
needs: [build]
40+
permissions: write-all
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/download-artifact@v4.3.0
44+
with:
45+
pattern: AppImage-*
46+
merge-multiple: true
47+
48+
- name: Release Artifacts
49+
uses: softprops/action-gh-release@v2.2.2
50+
with:
51+
name: "demo: ${{ env.VERSION }}"
52+
tag_name: "demo"
53+
prerelease: true
54+
draft: false
55+
generate_release_notes: false
56+
make_latest: true
57+
files: |
58+
*.AppImage*
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/sh
2+
3+
# Demonstration that bundles vkcube (vulkan) and glxgears (opengl)
4+
5+
set -eux
6+
7+
ARCH="$(uname -m)"
8+
SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh"
9+
URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh"
10+
EXTRA_PACKAGES="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/get-debloated-pkgs.sh"
11+
12+
export DEPLOY_OPENGL=1
13+
export DEPLOY_VULKAN=1
14+
export ICON=DUMMY
15+
export DESKTOP=DUMMY
16+
export OUTNAME=vkcube+glxgears-demo-"$ARCH".AppImage
17+
18+
pacman -Syu --noconfirm \
19+
base-devel \
20+
curl \
21+
git \
22+
libxcb \
23+
libxcursor \
24+
libxi \
25+
libxkbcommon \
26+
libxkbcommon-x11 \
27+
libxrandr \
28+
libxtst \
29+
mesa-utils \
30+
vulkan-tools \
31+
wget \
32+
xorg-server-xvfb \
33+
zsync
34+
35+
echo "Installing debloated packages..."
36+
echo "---------------------------------------------------------------"
37+
wget --retry-connrefused --tries=30 "$EXTRA_PACKAGES" -O ./get-debloated-pkgs.sh
38+
chmod +x ./get-debloated-pkgs.sh
39+
./get-debloated-pkgs.sh --add-mesa
40+
41+
echo "Bundling AppImage..."
42+
echo "---------------------------------------------------------------"
43+
wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun
44+
chmod +x ./quick-sharun
45+
./quick-sharun /usr/bin/vkcube /usr/bin/glxgears
46+
47+
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage
48+
chmod +x ./uruntime2appimage
49+
./uruntime2appimage
50+
mkdir -p ./dist
51+
mv -v ./*.AppImage ./dist
52+
53+
echo "All Done!"

0 commit comments

Comments
 (0)