Skip to content

Commit

Permalink
ci: pin nix-fast-build via flake input and disable macos
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderio committed May 18, 2024
1 parent 417299c commit 0a1da46
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 22 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,27 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
useDaemon: false
- run: nix run github:Mic92/nix-fast-build -- --skip-cached --no-nom --flake .#checks.${{ matrix.system }}
- run: nix run .#nix-fast-build -- --skip-cached --no-nom --flake .#checks.${{ matrix.system }}

macos:
strategy:
matrix:
os: [ "macos-13", "macos-14" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- uses: cachix/cachix-action@v14
with:
name: entropia
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
useDaemon: false
- run: nix run github:Mic92/nix-fast-build -- --skip-cached --no-nom --flake .#checks.${{ matrix.os == 'macos-14' && 'aarch64-darwin' || 'x86_64-darwin' }}
# disabled for now, as nix-fast-build failes on macos
# macos:
# strategy:
# matrix:
# os: [ "macos-13", "macos-14" ]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: DeterminateSystems/nix-installer-action@main
# with:
# extra-conf: |
# accept-flake-config = true
# - uses: DeterminateSystems/magic-nix-cache-action@main
# with:
# use-flakehub: false
# - uses: cachix/cachix-action@v14
# with:
# name: entropia
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# extraPullNames: nix-community
# useDaemon: false
# - run: nix run .#nix-fast-build -- --skip-cached --no-nom --flake .#checks.${{ matrix.os == 'macos-14' && 'aarch64-darwin' || 'x86_64-darwin' }}
80 changes: 80 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
sops-nix.inputs."nixpkgs".follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs."nixpkgs".follows = "nixpkgs";
nix-fast-build.url = "github:Mic92/nix-fast-build";
nix-fast-build.inputs."nixpkgs".follows = "nixpkgs";
};

outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
Expand All @@ -31,6 +33,9 @@
];

perSystem = { pkgs, inputs', ... }: {
packages = {
inherit (inputs'.nix-fast-build.packages) nix-fast-build;
};
devShells.default = pkgs.mkShellNoCC {
sopsPGPKeyDirs = [
"${toString ./.}/secrets/keys"
Expand Down

0 comments on commit 0a1da46

Please sign in to comment.