ci: update and speed up CI

This commit is contained in:
Gytis Ivaskevicius 2023-10-02 23:26:27 +03:00
parent 1577ffa311
commit 724fbc3c84
No known key found for this signature in database
GPG Key ID: 5680CA190BD2B15B
2 changed files with 26 additions and 12 deletions

View File

@ -1,4 +1,5 @@
name: CI
on:
push:
workflow_dispatch:
@ -6,16 +7,24 @@ on:
types: [opened]
jobs:
eval:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@main
# Quick eval
- run: nix develop --command evalnix
# Check formatting
- run: nix develop --command fmt --check
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.8.0pre20220311_d532269/install
# Quick eval
- run: nix develop --command evalnix
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@main
# Execute /tests/*
- run: nix develop --command check-derivation-outputs
@ -23,6 +32,13 @@ jobs:
- run: nix develop --command check-overlays-flow
- run: nix develop --command check-hosts-config
build-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@main
# Build /examples/*
- run: nix develop --command build-home-manager+nur+neovim-Rick
- run: nix develop --command build-minimal-multichannel-Hostname1
@ -30,5 +46,3 @@ jobs:
- run: nix develop --command build-exporters-Morty
- run: nix develop --command build-darwin
# Check formatting
- run: nix develop --command fmt --check

View File

@ -235,8 +235,8 @@ mergeAny otherArguments (
{ inherit pkgs; }
// (foldl' mkOutputs { } (attrNames systemOutputs))
)
# produces attrset in the shape of
# { nixosConfigurations = {}; darwinConfigurations = {}; ... }
# according to profile.output or the default `nixosConfigurations`
// foldl' mergeAny { } (attrValues (mapAttrs configurationBuilder hosts))
# produces attrset in the shape of
# { nixosConfigurations = {}; darwinConfigurations = {}; ... }
# according to profile.output or the default `nixosConfigurations`
// foldl' mergeAny { } (attrValues (mapAttrs configurationBuilder hosts))
)