mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-04 18:15:08 +02:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
builds:
|
|
description: "json array of builds: [ { system, runner, attr } ]"
|
|
required: true
|
|
type: string
|
|
timeout:
|
|
required: false
|
|
type: number
|
|
default: 60
|
|
|
|
jobs:
|
|
build:
|
|
name: (${{ matrix.system }})
|
|
runs-on:
|
|
- ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include: ${{ fromJSON(inputs.builds) }}
|
|
timeout-minutes: ${{ inputs.timeout }}
|
|
steps:
|
|
- name: Free disk space
|
|
if: endsWith( '-linux', matrix.system )
|
|
uses: wimpysworld/nothing-but-nix@main
|
|
with:
|
|
# Options: holster, carve, cleave (default), rampage
|
|
hatchet-protocol: rampage
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install nix
|
|
uses: cachix/install-nix-action@v31
|
|
- name: Setup nix cache
|
|
uses: cachix/cachix-action@v16
|
|
with:
|
|
name: nix-community
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
- name: Build ${{ matrix.attr }}
|
|
env:
|
|
attr: ${{ matrix.attr }}
|
|
run: |
|
|
nix build ".#$attr" \
|
|
--abort-on-warn \
|
|
--print-build-logs \
|
|
--log-format raw
|