diff --git a/.github/workflows/code-lint.yaml b/.github/workflows/code-lint.yaml index 7f0874e..f2900fb 100644 --- a/.github/workflows/code-lint.yaml +++ b/.github/workflows/code-lint.yaml @@ -57,7 +57,10 @@ jobs: - run: nix-build shell.nix --argstr spdk-path ./spdk - run: nix-shell --argstr spdk-path spdk --run "./build_scripts/build_spdk.sh configure -t $(uname -m)-unknown-linux-gnu" - run: nix-shell --argstr spdk-path spdk --run "./build_scripts/build_spdk.sh make" - - run: nix-shell --argstr spdk-path spdk --run "cargo build --all" + - run: nix-shell --argstr spdk-path spdk --run "cargo build --all --examples" + - run: sudo sysctl -w vm.nr_hugepages=512 + - run: sudo -E ./target/debug/examples/hello_world + if: ${{ matrix.os != 'github-arm64-2c-8gb' }} # - name: Setup tmate session # if: ${{ failure() }} # timeout-minutes: 120 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 472a97d..36320bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,6 @@ repos: name: Commit Lint description: Runs commitlint against the commit message. language: system - entry: bash -c 'nix-shell --pure --run "cat $1 | grep -v '^#' | commitlint"' + entry: bash -c 'nix-shell --pure --argstr spdk none --run "cat $1 | grep -v '^#' | commitlint"' args: [$1] stages: [commit-msg] diff --git a/nix/pkgs/libspdk/default.nix b/nix/pkgs/libspdk/default.nix index d5668aa..d20f0a5 100644 --- a/nix/pkgs/libspdk/default.nix +++ b/nix/pkgs/libspdk/default.nix @@ -48,6 +48,11 @@ , astyle }: let + nix-prefetch-github = pkgs.runCommand "nix-prefetch-github" { } '' + mkdir -p $out/bin + cp ${pkgs.nix-prefetch-github}/bin/nix-prefetch-github $out/bin/nix-prefetch-github + ''; + # Suffix for debug build name. nameSuffix = if build-type == "debug" then "-dev" else ""; @@ -113,7 +118,7 @@ let sourceRoot = spdk.name; - devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 pkgs.nix-prefetch-github ]; + devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 nix-prefetch-github ]; nativeBuildInputs = [ cmake