ci(nix): set up cachix earlier
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
269ead9d22
commit
b7e81edbbe
@ -70,6 +70,23 @@ def main(ctx):
|
|||||||
"cat /etc/nix/nix.conf"
|
"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",
|
"name": "nixpkgs-fmt",
|
||||||
"image": "docker.io/immawanderer/nix-nixpkgs-fmt:linux-amd64",
|
"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",
|
"image": "docker.io/nixos/nix:2.8.0-amd64",
|
||||||
"pull": "if-not-exists",
|
"pull": "if-not-exists",
|
||||||
# "depends_on": ["nixpkgs-fmt", "statix"],
|
# "depends_on": ["nixpkgs-fmt", "statix"],
|
||||||
"depends_on": ["nixpkgs-fmt", "statix", "enable sandbox"],
|
"depends_on": ["statix", "enable sandbox"],
|
||||||
"volumes": [
|
"volumes": [
|
||||||
{
|
{
|
||||||
"name": "nixconf",
|
"name": "nixconf",
|
||||||
@ -140,7 +157,7 @@ def main(ctx):
|
|||||||
"name": "go vet|test",
|
"name": "go vet|test",
|
||||||
"image": "docker.io/nixos/nix:2.8.0-amd64",
|
"image": "docker.io/nixos/nix:2.8.0-amd64",
|
||||||
"pull": "if-not-exists",
|
"pull": "if-not-exists",
|
||||||
"depends_on": ["enable sandbox"],
|
"depends_on": ["set up cachix"],
|
||||||
"volumes": [
|
"volumes": [
|
||||||
{
|
{
|
||||||
"name": "nix",
|
"name": "nix",
|
||||||
@ -160,28 +177,12 @@ def main(ctx):
|
|||||||
"nix develop --command go test -cover ./..."
|
"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",
|
"name": "nix build",
|
||||||
"image": "docker.io/nixos/nix:2.8.0-amd64",
|
"image": "docker.io/nixos/nix:2.8.0-amd64",
|
||||||
"pull": "if-not-exists",
|
"pull": "if-not-exists",
|
||||||
# "depends_on": ["nix flake check", "statix", "pre-build"],
|
# "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": [
|
"volumes": [
|
||||||
{
|
{
|
||||||
"name": "nix",
|
"name": "nix",
|
||||||
|
Loading…
Reference in New Issue
Block a user