Skip to content

Commit

Permalink
Merge pull request #4 from NobbZ/ci-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
NobbZ committed Dec 3, 2020
2 parents 95f7b21 + fc66e7f commit 96e7c39
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 27 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/environments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "build"

on:
push:
branches:
- master
pull_request:

jobs:
overlays:
name: Build package ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
matrix:
package:
- advcp
- elixir-lsp
- erlang-ls
- keyleds
- rofi-unicode
- keepass
steps:
- uses: actions/checkout@v2.3.1
- uses: cachix/install-nix-action@v12
- uses: cachix/cachix-action@v8
with: { name: nobbz, signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' }
- run: nix-shell --run 'nix-build -E "(import <nixpkgs> { overlays = import ./overlays.nix; }).${{ matrix.package }}"'

environment:
name: Build for ${{ matrix.hostname }}
needs: overlays
runs-on: ubuntu-latest
strategy:
matrix:
hostname:
- delly-nixos
- nixos
- tux-nixos
steps:
- uses: actions/checkout@v2.3.1
with: { fetch-depth: 0 }
- uses: cachix/install-nix-action@v12
with:
# install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-3.0pre20200820_4d77513/install
extra_nix_config: experimental-features = nix-command flakes
- uses: cachix/cachix-action@v8
with: { name: nobbz, signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' }
- run: nix-shell --run 'make build HOSTNAME=${{ matrix.hostname }}'
18 changes: 18 additions & 0 deletions .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "preflight"

on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: "Preflight – Linting"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.1
with: { fetch-depth: 0 }
- uses: cachix/install-nix-action@v12
- run: nix-shell --run 'find . -name '"'"'*.nix'"'"' -a -not -name sources.nix -exec nix-linter '"'"'{}'"'"' +'
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let

lefthook = pkgs.lefthook.override { buildGoModule = pkgs.buildGo114Module; };

inherit (pkgs) git gnumake niv nixpkgs-fmt nix-prefetch-git nix-prefetch-github;
inherit (pkgs) git gnumake niv nixpkgs-fmt nix-prefetch-git nix-prefetch-github nix-linter;
in
pkgs.mkShell {
name = "home-manager-shell";
Expand Down

0 comments on commit 96e7c39

Please sign in to comment.