mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-05 10:34:51 +02:00
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
name: Check
|
|
|
|
on:
|
|
workflow_dispatch: # can be triggered manually
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
push:
|
|
branches-ignore:
|
|
- update/*
|
|
paths-ignore:
|
|
- "LICENSE"
|
|
|
|
jobs:
|
|
flake-checker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install nix
|
|
uses: cachix/install-nix-action@v31
|
|
- name: Run flake checker
|
|
uses: DeterminateSystems/flake-checker-action@main
|
|
|
|
build-matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install nix
|
|
uses: cachix/install-nix-action@v31
|
|
- name: Generate Nix Matrix
|
|
id: set-matrix
|
|
run: |
|
|
set -Eeu
|
|
matrix="$(nix eval --json .#githubActions.matrix)"
|
|
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
|
|
|
build:
|
|
name: ${{ matrix.name }} (${{ matrix.system }})
|
|
needs:
|
|
- build-matrix
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }}
|
|
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
|