mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-02 21:59:05 +00:00
build: distribute gresource c/h with source tarball
This introduces the concept of a "dist resource" (specifically a `GhosttyDist.Resource` type). This is a resource that may be present in dist tarballs but not in the source tree. If the resource is present and we're not in a Git checkout, then we use it directly instead of generating it. This is used for the first time in this commit for the gresource c/h files, which depend on a variety of external tools (blueprint-compiler, glib-compile-resources, etc.) that we do not want to require downstream users/packagers to have and we also do not want to worry about them having the right versions. This also adds a check for `distcheck` to ensure our distribution contains all the expected files.
This commit is contained in:
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@@ -239,7 +239,17 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Build and Check Source Tarball
|
||||
run: nix develop -c zig build distcheck
|
||||
run: |
|
||||
rm -rf zig-out/dist
|
||||
nix develop -c zig build distcheck
|
||||
cp zig-out/dist/*.tar.gz ghostty-source.tar.gz
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: source-tarball
|
||||
path: |-
|
||||
ghostty-source.tar.gz
|
||||
|
||||
build-macos:
|
||||
runs-on: namespace-profile-ghostty-macos
|
||||
@@ -828,7 +838,7 @@ jobs:
|
||||
test-debian-12:
|
||||
name: Test build on Debian 12
|
||||
runs-on: namespace-profile-ghostty-sm
|
||||
needs: test
|
||||
needs: [test, build-dist]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -839,6 +849,11 @@ jobs:
|
||||
- name: Configure Namespace powered Buildx
|
||||
uses: namespacelabs/nscloud-setup-buildx-action@v0
|
||||
|
||||
- name: Download Source Tarball Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: source-tarball
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user