mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 13:30:29 +00:00
ci: add distcheck for lib-vt source tarball
Add a build-dist-lib-vt job that runs distcheck with -Demit-lib-vt=true and verifies the resulting tarball stays under 5 MB. Also downsize the build-dist runner from -md to -sm.
This commit is contained in:
45
.github/workflows/test.yml
vendored
45
.github/workflows/test.yml
vendored
@@ -85,6 +85,7 @@ jobs:
|
||||
- skip
|
||||
- build-bench
|
||||
- build-dist
|
||||
- build-dist-lib-vt
|
||||
- build-examples-zig
|
||||
- build-examples-cmake
|
||||
- build-examples-cmake-windows
|
||||
@@ -652,7 +653,7 @@ jobs:
|
||||
run: nm result/bin/.ghostty-wrapped 2>&1 | grep -q 'main_ghostty.main'
|
||||
|
||||
build-dist:
|
||||
runs-on: namespace-profile-ghostty-md
|
||||
runs-on: namespace-profile-ghostty-sm
|
||||
needs: test
|
||||
outputs:
|
||||
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
|
||||
@@ -693,6 +694,48 @@ jobs:
|
||||
path: |-
|
||||
ghostty-source.tar.gz
|
||||
|
||||
build-dist-lib-vt:
|
||||
runs-on: namespace-profile-ghostty-sm
|
||||
needs: test
|
||||
env:
|
||||
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
|
||||
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup Cache
|
||||
uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2
|
||||
with:
|
||||
path: |
|
||||
/nix
|
||||
/zig
|
||||
|
||||
# Install Nix and use that to run our tests so our environment matches exactly.
|
||||
- uses: cachix/install-nix-action@51f3067b56fe8ae331890c77d4e454f6d60615ff # v31.10.2
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
|
||||
with:
|
||||
name: ghostty
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Build and Check Source Tarball
|
||||
run: |
|
||||
rm -rf zig-out/dist
|
||||
nix develop -c zig build distcheck -Demit-lib-vt=true
|
||||
|
||||
- name: Verify tarball size
|
||||
run: |
|
||||
tarball=$(ls zig-out/dist/*.tar.gz)
|
||||
size=$(stat --format=%s "$tarball")
|
||||
max=$((5 * 1024 * 1024))
|
||||
echo "Tarball size: $size bytes (max: $max)"
|
||||
if [ "$size" -gt "$max" ]; then
|
||||
echo "ERROR: tarball exceeds 5 MB"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trigger-snap:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: namespace-profile-ghostty-xsm
|
||||
|
||||
Reference in New Issue
Block a user