Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
queue_rules:
- name: default
update_method: rebase
branch_protection_injection_mode: merge
update_bot_account: openebs-ci
merge_queue:
max_parallel_checks: 1
pull_request_rules:
- name: auto-label and approve backport PRs
conditions:
- author=mergify[bot]
- title~=\(backport \#[0-9]+\)$
actions:
label:
add:
- kind/backport
review:
type: APPROVE
message: "Automatically approved backport PR"
bot_account: openebs-ci
12 changes: 8 additions & 4 deletions .github/workflows/pr-code-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v26
- run: |
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: ${{ env.NIX_PATH }}
- name: nix-shell
run: nix-shell --pure --run exit
- name: cargo-clippy
Expand All @@ -28,8 +30,10 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v26
- run: |
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: ${{ env.NIX_PATH }}
- name: nix-shell
run: nix-shell --pure -p nixpkgs-fmt --run "nixpkgs-fmt --check ."
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ fn configure_spdk() -> Result<LibraryConfig, Error> {
spdk_lib.add_inc(spdk_path.join("include"))?;
spdk_lib.add_inc(spdk_path.join("include/spdk_internal"))?;

// For nix-builds the end derivation would end up with "include/spdk/module" and the local builds using the local "module"
// However on newer spdk, they also start using "include/spdk/module", meaning we can't use its presence as a check
// to load alternatively load module.
spdk_lib.add_inc(spdk_path.join("include/spdk/module"))?;
// So for now, simply ignore any module include error.
let _ = spdk_lib.add_inc(spdk_path.join("module"));

spdk_lib.add_inc_alt(spdk_path.join("include/spdk/lib"), spdk_path.join("lib"))?;
spdk_lib.add_inc_alt(
Expand Down
8 changes: 4 additions & 4 deletions build_scripts/tool_sha256.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ fi

msg_info "Using HEAD git revision: $REV"

CMD="nix-prefetch fetchFromGitHub --owner $OWNER --repo $REPO --fetchSubmodules --rev $REV"
CMD="nix-prefetch-github --fetch-submodules --rev $REV $OWNER $REPO"

msg_debug "Command to prefetch: $CMD"
msg_info "Fetching from github ..."

# For low verbosity levels, suppress fetch info printed by nex-prefect.
OUT=$($CMD)
if [[ "$VERBOSE" -ge "2" ]]
then
SHA=$($CMD)
else
SHA=$($CMD 2> /dev/null)
echo "$OUT"
fi
SHA=$(echo "$OUT" | grep '"hash"' | cut -d '"' -f4)

if [[ -z "$SHA" ]]
then
Expand Down
6 changes: 3 additions & 3 deletions nix/pkgs/libspdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ let
# Derivation attributes
#
spdk = rec {
rev = "234212ed0b2eb515b52f48fab291e366f23676f3";
sha256 = "sha256-FQz3AjRaLrGKK0wpZldzz2yaGSLM8g4xHRz4BbeY16c=";
rev = "fd233103d1a24e18a275159e68922e3d1289c28c";
sha256 = "sha256-ebr1C2r/CeNRU9RAIhBN6rdom7LFXkzIvs7l/GyGG70=";
pname = "libspdk${nameSuffix}";
version = "25.05-${lib.substring 0 7 rev}";
name = "${pname}-${version}";
Expand All @@ -112,7 +112,7 @@ let

sourceRoot = spdk.name;

devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 ];
devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 pkgs.nix-prefetch-github ];

nativeBuildInputs = [
cmake
Expand Down