ci: move nix build to dedicated job

This commit is contained in:
Mitchell Hashimoto
2023-12-22 14:20:27 -08:00
parent d8e1aebfcd
commit 18ada8d118

View File

@ -42,6 +42,29 @@ jobs:
- name: Test Build - name: Test Build
run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }} run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }}
build-nix:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
# Install Nix and use that to run our tests so our environment matches exactly.
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
- name: Test NixOS package build
run: nix build .#ghostty
build-macos: build-macos:
runs-on: ghcr.io/cirruslabs/macos-ventura-xcode:latest runs-on: ghcr.io/cirruslabs/macos-ventura-xcode:latest
needs: test needs: test
@ -73,6 +96,7 @@ jobs:
# Nix breaks xcodebuild so this has to be run outside. # Nix breaks xcodebuild so this has to be run outside.
- name: Build Ghostty.app - name: Build Ghostty.app
run: cd macos && xcodebuild run: cd macos && xcodebuild
build-windows: build-windows:
runs-on: windows-2019 runs-on: windows-2019
# this will not stop other jobs from running # this will not stop other jobs from running
@ -156,9 +180,6 @@ jobs:
- name: Test Dynamic Build - name: Test Dynamic Build
run: nix develop -c zig build -Dstatic=false run: nix develop -c zig build -Dstatic=false
- name: Test NixOS package build
run: nix build .#ghostty
prettier: prettier:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps: