nix/gitlab-ci: add separate pipeline steps for Intel/ARM macOS
This commit is contained in:
parent
c705bf788a
commit
3f184e6323
1 changed files with 15 additions and 12 deletions
|
@ -4,7 +4,19 @@
|
|||
|
||||
{ depot, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = {
|
||||
cfg = let
|
||||
macOS = system: {
|
||||
stage = "build";
|
||||
image = "nixos/nix:latest";
|
||||
script = [
|
||||
"nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh"
|
||||
"nix build -v -f ./ci-root.nix --argstr system ${system} --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
||||
"nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
|
||||
];
|
||||
allow_failure = true;
|
||||
tags = [ "macos" ];
|
||||
};
|
||||
in {
|
||||
stages = [ "build" "deploy" ];
|
||||
|
||||
nixCache = {
|
||||
|
@ -23,17 +35,8 @@ let
|
|||
tags = [ "cacher" ];
|
||||
};
|
||||
|
||||
nixCacheMacOS = {
|
||||
stage = "build";
|
||||
image = "nixos/nix:latest";
|
||||
script = [
|
||||
"nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh"
|
||||
"nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
||||
"nix copy -v --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
|
||||
];
|
||||
allow_failure = true;
|
||||
tags = [ "macos" ];
|
||||
};
|
||||
nixCacheMacOSIntel = macOS "x86_64-darwin";
|
||||
nixCacheMacOSARM = macOS "aarch64-darwin";
|
||||
} // (lib.mapAttrs deployStage deployMachs);
|
||||
|
||||
deployMachs = lib.filterAttrs (name: cfg: cfg.config.my.deploy.enable) depot.ops.nixos.systemConfigs;
|
||||
|
|
Loading…
Reference in a new issue