ci: add caching
This commit is contained in:
parent
0b74408fcc
commit
e644e74f38
4 changed files with 17 additions and 5 deletions
|
@ -3,7 +3,10 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Run cargo check"
|
- name: "Run cargo check"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: nixos/nix
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix shell --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
||||||
- cargo check --workspace --all-targets
|
- cargo check --workspace --all-targets
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -5,5 +5,8 @@ steps:
|
||||||
- name: "Run cargo clippy"
|
- name: "Run cargo clippy"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#clippy github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix shell --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt github:nixos/nixpkgs/nixos-unstable#clippy github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
||||||
- cargo clippy
|
- cargo clippy
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -5,5 +5,8 @@ steps:
|
||||||
- name: "Run cargo test"
|
- name: "Run cargo test"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||||
commands:
|
commands:
|
||||||
- nix shell github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix shell --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt github:nixos/nixpkgs/nixos-unstable#cargo github:nixos/nixpkgs/nixos-unstable#gcc
|
||||||
- cargo test --workspace --all-targets
|
- cargo test --workspace --all-targets
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
|
@ -5,4 +5,7 @@ steps:
|
||||||
- name: "Run treefmt"
|
- name: "Run treefmt"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes
|
image: docker.nix-community.org/nixpkgs/nix-flakes
|
||||||
commands:
|
commands:
|
||||||
- nix fmt -- --fail-on-change
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
- nix fmt --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt -- --fail-on-change
|
||||||
|
volumes:
|
||||||
|
- /nix:/mnt/nix:ro
|
||||||
|
|
Loading…
Add table
Reference in a new issue