2024-05-23 13:27:08 -05:00
|
|
|
name: Build NixOS (on demand)
|
2024-01-23 16:09:05 -06:00
|
|
|
|
2024-01-23 11:51:13 -06:00
|
|
|
on:
|
2024-05-23 13:27:08 -05:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2024-06-20 11:17:27 -05:00
|
|
|
hosts:
|
2024-06-14 15:02:01 -05:00
|
|
|
description: 'list of hosts to build'
|
2024-05-23 13:27:08 -05:00
|
|
|
required: true
|
2024-09-04 14:17:20 -05:00
|
|
|
default: ',othalan,algiz'
|
2024-05-23 13:27:08 -05:00
|
|
|
type: string
|
|
|
|
lockFile:
|
|
|
|
description: 'flake.lock file'
|
|
|
|
type: string
|
|
|
|
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
2024-06-20 11:17:27 -05:00
|
|
|
hosts:
|
2024-06-14 15:02:01 -05:00
|
|
|
description: 'list of hosts to build'
|
2024-09-04 14:17:20 -05:00
|
|
|
default: ',othalan,algiz'
|
2024-05-23 13:27:08 -05:00
|
|
|
type: string
|
|
|
|
|
2024-06-20 11:17:27 -05:00
|
|
|
# concurrency:
|
|
|
|
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
|
|
|
# cancel-in-progress: true
|
2024-01-23 11:51:13 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-14 12:17:39 -05:00
|
|
|
- name: Checkout
|
2024-06-14 12:36:34 -05:00
|
|
|
uses: actions/checkout@v4
|
2024-06-14 12:17:39 -05:00
|
|
|
|
2024-11-04 12:27:17 -06:00
|
|
|
# needed to access ghostty repo for now
|
|
|
|
- name: Setup SSH
|
|
|
|
uses: MrSquaare/ssh-setup-action@v3
|
|
|
|
with:
|
|
|
|
host: github.com
|
|
|
|
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
|
2024-09-17 11:52:08 -05:00
|
|
|
- uses: ./.github/actions/clean-disk
|
|
|
|
with:
|
|
|
|
purge-packages: 'true'
|
2024-05-23 13:27:08 -05:00
|
|
|
|
2024-11-11 01:59:00 -06:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@v15
|
2024-06-18 11:14:15 -05:00
|
|
|
with:
|
2024-08-06 12:43:56 -05:00
|
|
|
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
|
2024-06-18 11:14:15 -05:00
|
|
|
extra-conf: |
|
2024-09-04 11:55:06 -05:00
|
|
|
experimental-features = pipe-operator
|
2024-06-18 11:14:15 -05:00
|
|
|
accept-flake-config = true
|
2024-06-29 18:10:42 -05:00
|
|
|
|
2024-09-16 02:58:02 -05:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
2024-02-19 14:16:00 -06:00
|
|
|
|
2024-11-04 12:27:17 -06:00
|
|
|
# - name: Install and login to attic cache
|
|
|
|
# run: |
|
|
|
|
# nix profile install "nixpkgs#attic-client"
|
|
|
|
# attic login oizys https://attic.dayl.in "${{ secrets.ATTIC_TOKEN }}"
|
2024-10-12 11:57:59 -05:00
|
|
|
|
2024-11-04 12:27:17 -06:00
|
|
|
# - uses: cachix/cachix-action@v15
|
|
|
|
# with:
|
|
|
|
# name: daylin
|
|
|
|
# authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
|
|
|
2024-05-23 13:27:08 -05:00
|
|
|
- name: write lock file
|
|
|
|
if: "${{ inputs.lockFile != '' }}"
|
|
|
|
run: |
|
|
|
|
echo '${{ inputs.lockFile }}' > flake.lock
|
|
|
|
git diff
|
|
|
|
|
2024-08-07 13:07:38 -05:00
|
|
|
- name: Pre-build Oizys
|
2024-09-04 11:57:20 -05:00
|
|
|
run: nix build . --print-build-logs
|
2024-08-07 13:07:38 -05:00
|
|
|
|
2024-01-30 13:40:15 -06:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2024-07-10 12:56:37 -05:00
|
|
|
nix run . \
|
|
|
|
-- \
|
|
|
|
build --minimal \
|
2024-09-04 14:17:20 -05:00
|
|
|
--host,="${{ inputs.hosts }}" \
|
2024-07-10 12:56:37 -05:00
|
|
|
--flake . \
|
|
|
|
--debug \
|
2024-06-20 11:17:27 -05:00
|
|
|
-- \
|
2024-08-06 12:43:56 -05:00
|
|
|
--keep-going \
|
2024-07-10 12:56:37 -05:00
|
|
|
--print-build-logs
|