Skip to content

Commit c20eb5e

Browse files
author
Adithya Ps
authored
Merge pull request pkgforge-dev#24 from psadi/feature/cache_deps
2 parents 8533717 + f2341e8 commit c20eb5e

File tree

3 files changed

+60
-25
lines changed

3 files changed

+60
-25
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ jobs:
3232
with:
3333
persist-credentials: false
3434

35+
- name: Cache dependencies
36+
id: cache-ghostty
37+
uses: actions/cache@v4
38+
with:
39+
path: |
40+
/var/cache/apt/archives
41+
/var/lib/apt/lists
42+
/tmp/offline-cache
43+
/usr/local/bin/appimagetool
44+
/usr/local/bin/minisign
45+
/usr/local/bin/zig
46+
/opt
47+
key: ${{ runner.os }}-${{ matrix.arch }}-ghostty-${{ hashFiles('**/setup.sh') }}
48+
restore-keys: |
49+
${{ runner.os }}-${{ matrix.arch }}-ghostty-
50+
3551
- name: Setup Build Env
3652
run: ./setup.sh
3753

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,12 @@ This AppImage supports the following architectures:
111111
- **x86_64**: Widely used in modern desktops and servers, supporting 64-bit processing.
112112
- **aarch64**: 64-bit ARM architecture, planned for future support in cloud computing environments.
113113

114-
## ❓ What's Next?
115-
116-
- [x] Provide AppImages for other supported architectures
117-
- [ ] Submit AppImage(s) to [AppImageHub](https://appimage.github.io/)
118-
- [ ] Dependency caching in ci for a faster release cycle
119-
120114
### 🛠️ Troubleshooting
121115

122116
**Known Issues**
123117

124118
1. **Failed to create EGL Display**
119+
125120
**Fix (Interim):** Fallback to x11 backend by running the AppImage from one of the below following options,
126121

127122
```bash
@@ -135,6 +130,17 @@ This AppImage supports the following architectures:
135130
# Option 3: Add `export GDK_BACKEND=x11` to your .bashrc or .zshrc and launch the appimage normally
136131
```
137132

133+
1. **[TERMINFO](https://ghostty.org/docs/help/terminfo) `xterm-ghostty` not-set/breaks functionality**
134+
135+
**Fix:** Set the TERMINFO value to `xterm-256color` at runtime by running the AppImage as follows,
136+
137+
```bash
138+
# Option 1
139+
❯ TERM=xterm-256color ./Ghostty-${VERSION}-${ARCH}.AppImage
140+
141+
# Option 2: Add `export TERM=xterm-256color` to your .bashrc or .zshrc and launch the appimage normally
142+
```
143+
138144
_If you encounter any errors, check the terminal for error messages that may indicate missing dependencies or other issues_
139145

140146
## 🤝 Contributing

setup.sh

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,42 @@ if command -v jq >/dev/null 2>&1; then
2323
fi
2424
fi
2525

26-
# update & install os base dependencies
27-
buildPkgs="build-essential libonig-dev libbz2-dev pandoc wget fuse libfuse2t64 file zsync appstream"
26+
# Update & install OS base dependencies
27+
rm /etc/apt/apt.conf.d/docker-clean
28+
buildPkgs="apt-utils build-essential libonig-dev libbz2-dev pandoc wget fuse libfuse2t64 file zsync appstream"
2829
ghosttyPkgs="libgtk-4-dev libadwaita-1-dev"
29-
apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq -y install ${buildPkgs} ${ghosttyPkgs}
30+
apt-get -qq update && apt-get -qq -y upgrade
31+
apt-get -qq -y --download-only install ${buildPkgs} ${ghosttyPkgs}
32+
apt -qq -y install ${buildPkgs} ${ghosttyPkgs}
3033

31-
# download & install other dependencies
34+
# Download & install other dependencies
3235
# appimagetool: https://github.com/AppImage/appimagetool
33-
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage"
34-
install "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool
36+
if [ ! -f '/usr/local/bin/appimagetool' ]; then
37+
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage" -O /tmp/appimagetool.AppImage
38+
chmod +x /tmp/appimagetool.AppImage
39+
mv /tmp/appimagetool.AppImage /usr/local/bin/appimagetool
40+
fi
3541

3642
# minisign: https://github.com/jedisct1/minisign
37-
wget -q "${MINISIGN_URL}" -O "minisign-linux.tar.gz"
38-
tar -xzf "minisign-linux.tar.gz"
39-
mv minisign-linux/"${ARCH}"/minisign /usr/local/bin
43+
if [ ! -f '/usr/local/bin/minisign' ]; then
44+
wget -q "${MINISIGN_URL}" -O /tmp/minisign-linux.tar.gz
45+
tar -xzf /tmp/minisign-linux.tar.gz -C /tmp
46+
mv /tmp/minisign-linux/"${ARCH}"/minisign /usr/local/bin
47+
fi
4048

4149
# zig: https://ziglang.org
42-
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz"
43-
tar -xf "zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz" -C /opt
44-
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig
45-
46-
# cleanup
47-
rm -r \
48-
"appimagetool-${ARCH}.AppImage" \
49-
"minisign-linux.tar.gz" \
50-
"minisign-linux" \
51-
"zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz"
50+
if [ ! -d "/opt/zig-linux-${ARCH}-${ZIG_VERSION}" ]; then
51+
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz" -O /tmp/zig-linux.tar.xz
52+
tar -xf /tmp/zig-linux.tar.xz -C /opt
53+
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig
54+
fi
55+
56+
# Cleanup
57+
rm -rf \
58+
/tmp/appimagetool.AppImage \
59+
/tmp/minisign-linux.tar.gz \
60+
/tmp/minisign-linux \
61+
/tmp/zig-linux.tar.xz
62+
63+
# Reset DEBIAN_FRONTEND to default
64+
unset DEBIAN_FRONTEND

0 commit comments

Comments
 (0)