Merge pull request #1152 from mitchellh/cachix

ci: swap magic-nix-cache with cachix
This commit is contained in:
Mitchell Hashimoto
2023-12-22 15:36:11 -08:00
committed by GitHub
3 changed files with 26 additions and 63 deletions

View File

@ -10,28 +10,9 @@ jobs:
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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Check Zig cache hash
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
#
# NOTE: Build is disabled until we resolve dependency build speeds.
# build:
# needs: check-zig-cache-hash
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup Nix
# uses: cachix/install-nix-action@v24
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# - name: Setup Nix cache
# uses: DeterminateSystems/magic-nix-cache-action@main
# with:
# diagnostic-endpoint: "" # disable telemetry
# - name: Run build
# run: nix build .

View File

@ -47,12 +47,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# Setup Sparkle
- name: Setup Sparkle

View File

@ -30,12 +30,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# Cross-compile the binary. We always use static building for this
# because its the only way to access the headers.
@ -43,10 +41,7 @@ jobs:
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 }}
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
@ -56,12 +51,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Test NixOS package build
run: nix build .#ghostty
@ -80,12 +73,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# GhosttyKit is the framework that is built from Zig for our native
# Mac app to access.
@ -150,10 +141,7 @@ jobs:
run: Get-Content -Path ".\build.log"
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -162,12 +150,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: test
run: nix develop -c zig build -Dapp-runtime=none test
@ -188,11 +174,10 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: prettier check
run: nix develop -c prettier --check .
@ -203,10 +188,9 @@ jobs:
- 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
- uses: cachix/cachix-action@v12
with:
diagnostic-endpoint: "" # disable telemetry
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: alejandra check
run: nix develop -c alejandra --check .