Files
ghostty/.github/workflows/freestanding.yml
2026-08-30 17:06:39 +02:00

52 lines
1.5 KiB
YAML

on:
push: {}
pull_request: {}
workflow_dispatch: {}
name: Freestanding
# We only want the latest commit to test for any non-main ref.
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'main' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-libghostty-vt:
if: github.repository == 'ghostty-org/ghostty'
strategy:
matrix:
include:
- target: riscv32-freestanding-eabi
cpu: baseline
- target: thumb-freestanding-eabi
cpu: cortex_m4
runs-on: namespace-profile-ghostty-sm
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Cache
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
path: |
/nix
/zig
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
run: |
nix develop -c zig build -Demit-lib-vt \
-Dtarget=${{ matrix.target }} \
-Dcpu=${{ matrix.cpu }} \
-Doptimize=ReleaseSafe