Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.github/ @coder/ghostty-web-maintainers
/scripts/ @coder/ghostty-web-maintainers
/patches/ @coder/ghostty-web-maintainers
/ghostty @coder/ghostty-web-maintainers
/.gitmodules @coder/ghostty-web-maintainers
/package.json @coder/ghostty-web-maintainers
/bun.lock @coder/ghostty-web-maintainers
/demo/package.json @coder/ghostty-web-maintainers
/demo/bun.lock @coder/ghostty-web-maintainers
/vite.config.js @coder/ghostty-web-maintainers
/release-please-config.json @coder/ghostty-web-maintainers
34 changes: 29 additions & 5 deletions .github/actions/setup-zig/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,29 @@ inputs:
description: 'Zig version to install'
required: true
default: '0.15.2'
cache:
description: 'Reuse a cached Zig installation'
required: false
default: 'true'
runs:
using: 'composite'
steps:
- name: Cache Zig
uses: actions/cache@v4
if: inputs.cache == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache-zig
with:
path: |
~/zig
key: zig-${{ runner.os }}-${{ inputs.version }}
key: zig-v2-${{ runner.os }}-${{ inputs.version }}

- name: Download and install Zig
if: steps.cache-zig.outputs.cache-hit != 'true'
shell: bash
env:
VERSION: ${{ inputs.version }}
run: |
set -e
VERSION="${{ inputs.version }}"
set -euo pipefail

# Determine platform
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
Expand All @@ -44,8 +50,26 @@ runs:
TARBALL="zig-${ARCH}-${PLATFORM}-${VERSION}.tar.xz"
URL="https://ziglang.org/download/${VERSION}/${TARBALL}"

# SHA-256 of each supported tarball, from https://ziglang.org/download/
case "${TARBALL}" in
zig-x86_64-linux-0.15.2.tar.xz)
SHA256="02aa270f183da276e5b5920b1dac44a63f1a49e55050ebde3aecc9eb82f93239"
;;
zig-aarch64-macos-0.15.2.tar.xz)
SHA256="3cc2bab367e185cdfb27501c4b30b1b0653c28d9f73df8dc91488e66ece5fa6b"
;;
zig-x86_64-macos-0.15.2.tar.xz)
SHA256="375b6909fc1495d16fc2c7db9538f707456bfc3373b14ee83fdd3e22b3d43f7f"
;;
*)
echo "No checksum recorded for ${TARBALL}; add it to .github/actions/setup-zig/action.yml"
exit 1
;;
esac

echo "Downloading Zig ${VERSION} for ${PLATFORM}-${ARCH}..."
curl --retry 3 --retry-delay 5 -L -o "/tmp/${TARBALL}" "${URL}"
curl --fail --retry 3 --retry-delay 5 -L -o "/tmp/${TARBALL}" "${URL}"
echo "${SHA256} /tmp/${TARBALL}" | shasum -a 256 -c -

# Extract to home directory
mkdir -p ~/zig
Expand Down
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2
updates:
- package-ecosystem: github-actions
directories:
- /
- /.github/actions/setup-zig
schedule:
interval: weekly
commit-message:
prefix: ci
groups:
actions:
patterns:
- '*'

- package-ecosystem: bun
directory: /
schedule:
interval: weekly
commit-message:
prefix: chore
groups:
tooling:
patterns:
- '*'
update-types:
- minor
- patch

- package-ecosystem: bun
directory: /demo
schedule:
interval: weekly
commit-message:
prefix: deps
ignore:
- dependency-name: ghostty-web
51 changes: 31 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Check formatting
run: bun run fmt
Expand All @@ -27,14 +32,16 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Run linter
run: bun run lint
Expand All @@ -43,14 +50,16 @@ jobs:
name: type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Check types
run: bun run typecheck
Expand All @@ -59,13 +68,14 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: recursive
persist-credentials: false

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- uses: ./.github/actions/setup-zig
with:
Expand All @@ -75,7 +85,7 @@ jobs:
run: ./scripts/build-wasm.sh

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Run tests
run: bun test
Expand All @@ -84,13 +94,14 @@ jobs:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: recursive
persist-credentials: false

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- uses: ./.github/actions/setup-zig
with:
Expand All @@ -109,7 +120,7 @@ jobs:
fi

- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile

- name: Build library
run: bun run build
6 changes: 3 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: latest
bun-version: 1.4.4

- name: Install dependencies
env:
Expand Down
Loading