Skip to content
Merged
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
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: macos-15
steps:
- uses: actions/checkout@v4

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16"

- name: Run tests
run: swift test --package-path Packages/CrowCore

build:
name: Build
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16"

- uses: mlugg/setup-zig@v2
with:
version: 0.15.2

- name: Get Ghostty submodule SHA
id: ghostty-sha
run: echo "sha=$(git -C vendor/ghostty rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Cache Ghostty framework
id: ghostty-cache
uses: actions/cache@v4
with:
path: Frameworks
key: ghostty-${{ runner.os }}-${{ runner.arch }}-${{ steps.ghostty-sha.outputs.sha }}

- name: Build Ghostty
if: steps.ghostty-cache.outputs.cache-hit != 'true'
run: |
unset ZIG_LOCAL_CACHE_DIR ZIG_GLOBAL_CACHE_DIR
make ghostty

- name: Cache SPM dependencies
uses: actions/cache@v4
with:
path: .build
key: spm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Package.swift', 'Packages/*/Package.swift') }}
restore-keys: |
spm-${{ runner.os }}-${{ runner.arch }}-

- name: Generate build info
run: bash scripts/generate-build-info.sh

- name: Build
run: swift build
Loading