Skip to content

Commit 5b4dfc2

Browse files
authored
Merge pull request #68 from psadi/feature/ci_changes
ci: handle zig versions for stable and nightly builds
2 parents 35e38cc + 6a97f05 commit 5b4dfc2

File tree

4 files changed

+20
-102
lines changed

4 files changed

+20
-102
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
platform: linux/amd64
3434
runs-on: ubuntu-24.04
3535
container:
36-
image: ghcr.io/psadi/ghostty-appimage:latest
36+
image: ghcr.io/pkgforge-dev/archlinux:latest
3737
steps:
3838
- name: Checkout ghostty-appimage
3939
uses: actions/checkout@v4
@@ -45,12 +45,24 @@ jobs:
4545
uses: actions/cache@v4
4646
with:
4747
path: |
48+
/var/cache/pacman
4849
/tmp/offline-cache
4950
/root/.cache/zig
5051
key: ${{ runner.os }}-${{ matrix.arch }}-ghostty-${{ hashFiles('**/VERSION') }}
5152
restore-keys: |
5253
${{ runner.os }}-${{ matrix.arch }}-ghostty-
5354
55+
- name: Setup build environment
56+
run: |
57+
if [ "${{ github.event_name }}" == "schedule" ]; then
58+
ZIG_VERSION=0.14.0
59+
else
60+
ZIG_VERSION=0.13.0
61+
fi
62+
63+
sed -i "s/#ZIG_VERSION/${ZIG_VERSION}/g" setup.sh
64+
./setup.sh
65+
5466
- name: Build Ghostty AppImage
5567
run: |
5668
if [ "${{ github.event_name }}" == "schedule" ]; then

.github/workflows/image.yaml

Lines changed: 0 additions & 84 deletions
This file was deleted.

Containerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

setup.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ get_latest_gh_release() {
1212
# Update & install OS base dependencies
1313
buildDeps="base-devel freetype2 oniguruma wget mesa file zsync appstream xorg-server-xvfb patchelf binutils strace git jq"
1414
ghosttyDeps="gtk4 libadwaita blueprint-compiler gtk4-layer-shell"
15+
rm -rf "/usr/share/libalpm/hooks/package-cleanup.hook"
1516
pacman -Syuq --needed --noconfirm --noprogressbar ${buildDeps} ${ghosttyDeps}
1617

1718
export ARCH="$(uname -m)"
1819

19-
ZIG_VERSION="0.13.0"
20+
ZIG_VERSION="#ZIG_VERSION"
2021
PANDOC_VERSION="$(get_latest_gh_release 'jgm/pandoc')"
2122
MINISIGN_VERSION="$(get_latest_gh_release 'jedisct1/minisign')"
2223
SHARUN_VERSION="$(get_latest_gh_release 'VHSgunzo/sharun')"
@@ -55,13 +56,11 @@ pacman -U --noconfirm /tmp/llvm-libs.pkg.tar.zst /tmp/libxml2.pkg.tar.zst
5556

5657
# Download & install other dependencies
5758
# zig: https://ziglang.org
58-
if [ ! -d "/opt/zig-linux-${ARCH}-${ZIG_VERSION}" ]; then
59-
rm -rf /opt/zig*
60-
unlink /usr/local/bin/zig || true
61-
wget "${ZIG_URL}" -O /tmp/zig-linux.tar.xz
62-
tar -xJf /tmp/zig-linux.tar.xz -C /opt
63-
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig
64-
fi
59+
rm -rf /opt/zig*
60+
unlink /usr/local/bin/zig || true
61+
wget "${ZIG_URL}" -O /tmp/zig-linux.tar.xz
62+
tar -xJf /tmp/zig-linux.tar.xz -C /opt
63+
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig
6564

6665
# appimagetool: https://github.com/AppImage/appimagetool
6766
rm -rf /usr/local/bin/appimagetool

0 commit comments

Comments
 (0)