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 - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: alejandra -c . - name: alejandra -c .
run: 'nix develop -c alejandra -c .' run: 'nix shell nixpkgs#alejandra -c alejandra -c .'
build: build:
runs-on: beefcake runs-on: beefcake
@ -22,7 +22,7 @@ jobs:
key: ${{ runner.os }}-build key: ${{ runner.os }}-build
- name: cargo build - name: cargo build
run: 'nix develop -c cargo build' run: 'nix develop .#rust-build -c cargo build'
test: test:
runs-on: beefcake runs-on: beefcake
@ -45,7 +45,7 @@ jobs:
key: ${{ runner.os }}-build key: ${{ runner.os }}-build
- name: cargo test - name: cargo test
run: 'nix develop -c cargo test' run: 'nix develop .#rust-build -c cargo test'
formatting-rust: formatting-rust:
runs-on: beefcake runs-on: beefcake
@ -61,7 +61,7 @@ jobs:
key: ${{ runner.os }}-formatting key: ${{ runner.os }}-formatting
- name: cargo fmt --check - name: cargo fmt --check
run: 'nix develop -c cargo fmt --check' run: 'nix develop .#rust-build -c cargo fmt --check'
lint: lint:
runs-on: beefcake runs-on: beefcake
@ -77,4 +77,4 @@ jobs:
key: ${{ runner.os }}-lint key: ${{ runner.os }}-lint
- name: cargo clippy - 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 devShells = forEachSupportedSystem (system: let
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
in { 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 { rust-dev = pkgs.mkShell {
inherit (outputs.checks.${system}.pre-commit-check) shellHook; inherit (outputs.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs; buildInputs =
[ outputs.devShells.${system}.rust-build.buildInputs
cargo
rustc
rustfmt
rustPackages.clippy
rust-analyzer
# linker
clang
mold
# debugger
lldb
# libs
libopus
openssl
pkg-config
]
++ outputs.checks.${system}.pre-commit-check.enabledPackages; ++ outputs.checks.${system}.pre-commit-check.enabledPackages;
}; };