configuration.nix/.forgejo/workflows/check.yml
Jalil David Salamé Messina 78327cd972
All checks were successful
/ check (push) Successful in 9s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Successful in 13s
/ build-vm (push) Successful in 2s
/ report-size (push) Successful in 4s
ci: use nix-fast-build to speedup checks
This should provide a nice speedup over calling nix build sequentially
2025-03-16 19:15:05 +01:00

56 lines
2.1 KiB
YAML

on:
push:
jobs:
check:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Run checks
run: |
nix --version
nix-fast-build --max-jobs 2 --no-nom --skip-cached --no-link \
--flake ".#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
check-renovaterc:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Validate renovaterc.json
run: |
nix --version
nix shell nixpkgs#renovate --command renovate-config-validator
build-packages:
runs-on: nixos
needs: check
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Build target
run: |
nix --version
nix-fast-build --max-jobs 2 --no-nom --skip-cached --no-link \
--flake ".#packages.$(nix eval --raw --impure --expr builtins.currentSystem)"
build-vm:
runs-on: nixos
needs: build-packages
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Build VM configuration
run: |
nix --version
nix build --print-build-logs '.#nixosConfigurations.vm.config.system.build.toplevel'
report-size:
runs-on: nixos
needs: build
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- run: nix --version
- name: Create Size Report
uses: "https://git.salame.cl/jalil/nix-flake-outputs-size@5c40a31e3e2ed0ea28f8ba68deca41d05fdf2e71" # main
with:
# Create a comment on the associated PR
comment-on-pr: ${{ github.ref_name != 'main' }}
# Generate artifacts on main (to speed up comparisons)
generate-artifact: ${{ github.ref_name == 'main' }}
# Generate comparisons to main
do-comparison: 'true'
# This job's name (so we can find the artifacts)
job-name: report-size