Merge pull request #138 from gytis-ivaskevicius/update-ci

ci: update and speed up CI
This commit is contained in:
Gytis Ivaskevicius 2023-10-02 23:36:09 +03:00 committed by GitHub
commit f9d088fb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 17 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

@ -2,7 +2,7 @@
description = "A highly awesome system configuration.";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/release-21.05;
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable-small;
utils.url = path:../../;
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";

View File

@ -2,7 +2,7 @@
description = "FUP exporters demo";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/release-21.05;
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable-small; # Lets pretend that this is a stable channel
unstable.url = github:nixos/nixpkgs/nixos-unstable-small;
utils.url = path:../../;
};

View File

@ -13,7 +13,7 @@
};
home-manager = {
url = github:nix-community/home-manager/release-21.05;
url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs";
};
};

View File

@ -2,8 +2,8 @@
description = "A highly awesome system configuration.";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/release-21.05;
unstable.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable-small; # Lets pretend that this is a stable channel
unstable.url = github:nixos/nixpkgs/nixos-unstable-small;
utils.url = path:../../;
};

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))
)