Add tar, split out CI devshell vs interactive devshell (avoid setting up precommit hooks)
This commit is contained in:
parent
685b9228be
commit
f44e2e9074
|
@ -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'
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -45,11 +45,8 @@
|
||||||
devShells = forEachSupportedSystem (system: let
|
devShells = forEachSupportedSystem (system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
in {
|
in {
|
||||||
rust-dev = pkgs.mkShell {
|
rust-build = pkgs.mkShell {
|
||||||
inherit (outputs.checks.${system}.pre-commit-check) shellHook;
|
buildInputs = with pkgs; [
|
||||||
|
|
||||||
buildInputs = with pkgs;
|
|
||||||
[
|
|
||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
rustfmt
|
rustfmt
|
||||||
|
@ -67,7 +64,14 @@
|
||||||
libopus
|
libopus
|
||||||
openssl
|
openssl
|
||||||
pkg-config
|
pkg-config
|
||||||
]
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
rust-dev = pkgs.mkShell {
|
||||||
|
inherit (outputs.checks.${system}.pre-commit-check) shellHook;
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
outputs.devShells.${system}.rust-build.buildInputs
|
||||||
++ outputs.checks.${system}.pre-commit-check.enabledPackages;
|
++ outputs.checks.${system}.pre-commit-check.enabledPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue