Skip to content

Commit 2c0797e

Browse files
authored
Merge pull request #93 from openebs/fix-dev
Fix running local dev binaries
2 parents 2b48339 + 5f9a9c3 commit 2c0797e

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/code-lint.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ jobs:
5757
- run: nix-build shell.nix --argstr spdk-path ./spdk
5858
- run: nix-shell --argstr spdk-path spdk --run "./build_scripts/build_spdk.sh configure -t $(uname -m)-unknown-linux-gnu"
5959
- run: nix-shell --argstr spdk-path spdk --run "./build_scripts/build_spdk.sh make"
60-
- run: nix-shell --argstr spdk-path spdk --run "cargo build --all"
60+
- run: nix-shell --argstr spdk-path spdk --run "cargo build --all --examples"
61+
- run: sudo sysctl -w vm.nr_hugepages=512
62+
- run: sudo -E ./target/debug/examples/hello_world
63+
if: ${{ matrix.os != 'github-arm64-2c-8gb' }}
6164
# - name: Setup tmate session
6265
# if: ${{ failure() }}
6366
# timeout-minutes: 120

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ repos:
2828
name: Commit Lint
2929
description: Runs commitlint against the commit message.
3030
language: system
31-
entry: bash -c 'nix-shell --pure --run "cat $1 | grep -v '^#' | commitlint"'
31+
entry: bash -c 'nix-shell --pure --argstr spdk none --run "cat $1 | grep -v '^#' | commitlint"'
3232
args: [$1]
3333
stages: [commit-msg]

nix/pkgs/libspdk/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
, astyle
4949
}:
5050
let
51+
nix-prefetch-github = pkgs.runCommand "nix-prefetch-github" { } ''
52+
mkdir -p $out/bin
53+
cp ${pkgs.nix-prefetch-github}/bin/nix-prefetch-github $out/bin/nix-prefetch-github
54+
'';
55+
5156
# Suffix for debug build name.
5257
nameSuffix = if build-type == "debug" then "-dev" else "";
5358

@@ -113,7 +118,7 @@ let
113118

114119
sourceRoot = spdk.name;
115120

116-
devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 pkgs.nix-prefetch-github ];
121+
devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 nix-prefetch-github ];
117122

118123
nativeBuildInputs = [
119124
cmake

0 commit comments

Comments
 (0)