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: jobs:
check: check:
runs-on: nixos runs-on: nixos
needs: build strategy:
matrix:
check:
- nvimDev
- nvimHeadless
- nvimNoBundledBins
- nvimNoLsp
- nvimNoTSGrammars
- treefmt
steps: steps:
- uses: "https://code.forgejo.org/actions/checkout@v4" - uses: "https://git.salame.cl/actions/checkout@v4"
- run: nix --version - name: Run checks
- name: Run Checks run: |
run: nix flake check --keep-going --verbose nix --version
# shellcheck disable=SC2016
nix build --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}'
build: build:
runs-on: nixos runs-on: nixos
if: github.event_name == 'push' needs: check
strategy: strategy:
matrix: matrix:
target: target:
@ -21,10 +31,12 @@ jobs:
- nixosConfigurations.vm.config.system.build.toplevel - nixosConfigurations.vm.config.system.build.toplevel
- nvim - nvim
steps: steps:
- uses: "https://code.forgejo.org/actions/checkout@v4" - uses: "https://git.salame.cl/actions/checkout@v4"
- run: nix --version
- name: Build target - 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: report-size:
runs-on: nixos runs-on: nixos
needs: build needs: build