Add tar, split out CI devshell vs interactive devshell (avoid setting up precommit hooks)

This commit is contained in:
Daniel Flanagan 2024-08-06 10:07:51 -05:00
parent 685b9228be
commit f44e2e9074
2 changed files with 29 additions and 25 deletions

View file

@ -6,7 +6,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: alejandra -c .
run: 'nix develop -c alejandra -c .'
run: 'nix shell nixpkgs#alejandra -c alejandra -c .'
build:
runs-on: beefcake
@ -22,7 +22,7 @@ jobs:
key: ${{ runner.os }}-build
- name: cargo build
run: 'nix develop -c cargo build'
run: 'nix develop .#rust-build -c cargo build'
test:
runs-on: beefcake
@ -45,7 +45,7 @@ jobs:
key: ${{ runner.os }}-build
- name: cargo test
run: 'nix develop -c cargo test'
run: 'nix develop .#rust-build -c cargo test'
formatting-rust:
runs-on: beefcake
@ -61,7 +61,7 @@ jobs:
key: ${{ runner.os }}-formatting
- name: cargo fmt --check
run: 'nix develop -c cargo fmt --check'
run: 'nix develop .#rust-build -c cargo fmt --check'
lint:
runs-on: beefcake
@ -77,4 +77,4 @@ jobs:
key: ${{ runner.os }}-lint
- name: cargo clippy
run: 'nix develop -c cargo clippy'
run: 'nix develop .#rust-build -c cargo clippy'

View file

@ -45,29 +45,33 @@
devShells = forEachSupportedSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
rust-build = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
rustc
rustfmt
rustPackages.clippy
rust-analyzer
# linker
clang
mold
# debugger
lldb
# libs
libopus
openssl
pkg-config
];
};
rust-dev = pkgs.mkShell {
inherit (outputs.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs;
[
cargo
rustc
rustfmt
rustPackages.clippy
rust-analyzer
# linker
clang
mold
# debugger
lldb
# libs
libopus
openssl
pkg-config
]
buildInputs =
outputs.devShells.${system}.rust-build.buildInputs
++ outputs.checks.${system}.pre-commit-check.enabledPackages;
};