Skip to content

Commit bd4dbc4

Browse files
author
psadi
committed
ci: pandoc dep
1 parent 081fee1 commit bd4dbc4

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ jobs:
3838
with:
3939
path: |
4040
/tmp/offline-cache
41-
/usr/local/bin/appimagetool
42-
/usr/local/bin/minisign
43-
/usr/local/bin/zig
41+
/usr/local/bin
4442
/opt
4543
key: ${{ runner.os }}-${{ matrix.arch }}-ghostty-${{ hashFiles('**/setup.sh') }}
4644
restore-keys: |

build.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ set -e
55
export ARCH="$(uname -m)"
66

77
GHOSTTY_VERSION="1.1.0"
8-
9-
# Detect latest version numbers when jq is available.
10-
if command -v jq >/dev/null 2>&1; then
11-
if [ "$1" = "latest" ]; then
12-
GHOSTTY_VERSION="$(
13-
curl -s https://api.github.com/repos/ghostty-org/ghostty/tags |
14-
jq '[.[] | select(.name != "tip") | .name | ltrimstr("v")] | sort_by(split(".") | map(tonumber)) | last'
15-
)"
16-
fi
17-
fi
18-
198
TMP_DIR="/tmp/ghostty-build"
209
APP_DIR="${TMP_DIR}/ghostty.AppDir"
2110
PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"

setup.sh

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
11
#!/bin/sh
22

3-
install_pandoc() {
4-
git clone https://aur.archlinux.org/pandoc.git
5-
cd pandoc || {
6-
echo "Failed to enter pandoc directory"
7-
return 1
8-
}
9-
makepkg -si --noconfirm
10-
cd ..
11-
rm -rf pandoc
12-
echo "Pandoc installed"
13-
}
14-
153
set -e
164

175
export ARCH="$(uname -m)"
186

197
ZIG_VERSION="0.13.0"
20-
MINISIGN_URL="https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz"
8+
PANDOC_VERSION="3.6.3"
9+
MINISIGN_VERSION="0.11"
10+
11+
PANDOC_BASE="https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}"
12+
MINISIGN_URL="https://github.com/jedisct1/minisign/releases/download/${MINISIGN_VERSION}/minisign-${MINISIGN_VERSION}-linux.tar.gz"
13+
APPIMAGE_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage"
14+
ZIG_URL="https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz"
15+
16+
case "${ARCH}" in
17+
"x86_64")
18+
PANDOC_URL="${PANDOC_BASE}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz"
19+
;;
20+
"aarch64")
21+
PANDOC_URL="${PANDOC_BASE}/pandoc-${PANDOC_VERSION}-linux-arm64.tar.gz"
22+
;;
23+
*)
24+
echo "Unsupported ARCH: '${ARCH}'"
25+
exit 1
26+
;;
27+
esac
2128

2229
# Update & install OS base dependencies
2330
buildPkgs="base-devel freetype2 oniguruma wget fuse file zsync appstream"
2431
ghosttyPkgs="gtk4 libadwaita"
2532
pacman -Syu --noconfirm
2633
# pacman -Syw --noconfirm ${buildPkgs} ${ghosttyPkgs}
2734
pacman -Syq --needed --noconfirm ${buildPkgs} ${ghosttyPkgs}
28-
install_pandoc
2935

3036
# Download & install other dependencies
3137
# appimagetool: https://github.com/AppImage/appimagetool
3238
if [ ! -f '/usr/local/bin/appimagetool' ]; then
33-
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage" -O /tmp/appimagetool.AppImage
39+
wget -q "${APPIMAGE_URL}" -O /tmp/appimagetool.AppImage
3440
chmod +x /tmp/appimagetool.AppImage
3541
mv /tmp/appimagetool.AppImage /usr/local/bin/appimagetool
3642
fi
@@ -44,14 +50,21 @@ fi
4450

4551
# zig: https://ziglang.org
4652
if [ ! -d "/opt/zig-linux-${ARCH}-${ZIG_VERSION}" ]; then
47-
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz" -O /tmp/zig-linux.tar.xz
53+
wget -q "${ZIG_URL}" -O /tmp/zig-linux.tar.xz
4854
tar -xf /tmp/zig-linux.tar.xz -C /opt
4955
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig
5056
fi
5157

58+
# pandoc: https://github.com/jgm/pandoc
59+
if [ ! -f '/usr/local/bin/pandoc' ]; then
60+
wget -q "${PANDOC_URL}" -O /tmp/pandoc-linux.tar.gz
61+
tar -xzf pandoc-linux.tar.gz -C /tmp
62+
mv "/tmp/pandoc-${PANDOC_VERSION}/bin/*" /usr/local/bin
63+
fi
64+
5265
# Cleanup
5366
rm -rf \
5467
/tmp/appimagetool.AppImage \
55-
/tmp/minisign-linux.tar.gz \
56-
/tmp/minisign-linux \
57-
/tmp/zig-linux.tar.xz
68+
/tmp/minisign-linux* \
69+
/tmp/zig-linux.tar.xz \
70+
/tmp/pandoc*

0 commit comments

Comments
 (0)