nix-community.nixvim/.github/workflows/check.yml
2025-05-25 21:02:08 +01:00

65 lines
1.7 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:
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:
fail-fast: false
matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }}
timeout-minutes: 20
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