fix(ci): use a matrix for checks
All checks were successful
/ check (nvimDev) (push) Successful in 5s
/ check (nvimHeadless) (push) Successful in 2s
/ check (nvimNoBundledBins) (push) Successful in 4s
/ check (nvimNoLsp) (push) Successful in 4s
/ check (nvimNoTSGrammars) (push) Successful in 4s
/ check (treefmt) (push) Successful in 3s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 1s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 1s
/ build (nvim) (push) Successful in 1s
/ report-size (push) Successful in 3s

This should speed up CI and improve the dev experience.
This commit is contained in:
Jalil David Salamé Messina 2024-12-26 22:47:38 +01:00
parent fa5b24cb99
commit d667c7a537
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -3,15 +3,25 @@ on:
jobs:
check:
runs-on: nixos
needs: build
strategy:
matrix:
check:
- nvimDev
- nvimHeadless
- nvimNoBundledBins
- nvimNoLsp
- nvimNoTSGrammars
- treefmt
steps:
- uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version
- name: Run Checks
run: nix flake check --keep-going --verbose
- uses: "https://git.salame.cl/actions/checkout@v4"
- name: Run checks
run: |
nix --version
# shellcheck disable=SC2016
nix build --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}'
build:
runs-on: nixos
if: github.event_name == 'push'
needs: check
strategy:
matrix:
target:
@ -21,17 +31,19 @@ jobs:
- nixosConfigurations.vm.config.system.build.toplevel
- nvim
steps:
- uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version
- uses: "https://git.salame.cl/actions/checkout@v4"
- name: Build target
run: nix build --print-build-logs '.#${{ matrix.target }}'
run: |
nix --version
# shellcheck disable=SC2016
nix build --print-build-logs '.#${{ matrix.target }}'
report-size:
runs-on: nixos
needs: build
steps:
- uses: "https://git.salame.cl/actions/checkout@v4"
- run: nix --version
- name: Create Size Report
- name: Create Size Report
uses: https://git.salame.cl/jalil/nix-flake-outputs-size@main
with:
# Create a comment on the associated PR