ci(nix): set up cachix earlier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-05-21 21:04:22 +02:00
parent 269ead9d22
commit b7e81edbbe
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -70,6 +70,23 @@ def main(ctx):
"cat /etc/nix/nix.conf"
]
},
{
"name": "set up cachix",
"image": "docker.io/immawanderer/nix-cachix-glibc",
"pull": "if-not-exists",
"depends_on": ["enable sandbox"],
"volumes": [
{
"name": "nixconf",
"path": "/etc/nix"
}
],
"commands": [
"cat /etc/nix/nix.conf",
"cachix use go-xkcdreader",
"cat /etc/nix/nix.conf"
]
},
{
"name": "nixpkgs-fmt",
"image": "docker.io/immawanderer/nix-nixpkgs-fmt:linux-amd64",
@ -95,7 +112,7 @@ def main(ctx):
"image": "docker.io/nixos/nix:2.8.0-amd64",
"pull": "if-not-exists",
# "depends_on": ["nixpkgs-fmt", "statix"],
"depends_on": ["nixpkgs-fmt", "statix", "enable sandbox"],
"depends_on": ["statix", "enable sandbox"],
"volumes": [
{
"name": "nixconf",
@ -140,7 +157,7 @@ def main(ctx):
"name": "go vet|test",
"image": "docker.io/nixos/nix:2.8.0-amd64",
"pull": "if-not-exists",
"depends_on": ["enable sandbox"],
"depends_on": ["set up cachix"],
"volumes": [
{
"name": "nix",
@ -160,28 +177,12 @@ def main(ctx):
"nix develop --command go test -cover ./..."
]
},
{
"name": "set up cachix",
"image": "docker.io/immawanderer/nix-cachix-glibc",
"pull": "if-not-exists",
# "depends_on": ["nixpkgs-fmt", "statix"],
"depends_on": ["nixpkgs-fmt", "statix", "enable sandbox"],
"volumes": [
{
"name": "nixconf",
"path": "/etc/nix"
}
],
"commands": [
"cachix use go-xkcdreader"
]
},
{
"name": "nix build",
"image": "docker.io/nixos/nix:2.8.0-amd64",
"pull": "if-not-exists",
# "depends_on": ["nix flake check", "statix", "pre-build"],
"depends_on": ["nix flake check", "set up cachix"],
"depends_on": ["nixpkgs-fmt", "set up cachix", "nix flake check"],
"volumes": [
{
"name": "nix",