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
78 changes: 78 additions & 0 deletions .github/workflows/code-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Code Linter

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
push:
branches:
- develop
- 'release/**'

env:
CI: 1

jobs:
rust-lint:
strategy:
matrix:
os: [github-arm64-2c-8gb, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: |
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v31
with:
nix_path: ${{ env.NIX_PATH }}
- run: nix-build shell.nix
- name: cargo-fmt
run: nix-shell --pure --run "FMT_OPTS=--check ./scripts/rust-style.sh"
- name: cargo-clippy
run: nix-shell --pure --run ./scripts/rust-linter.sh

rust-dev:
strategy:
matrix:
os: [github-arm64-2c-8gb, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: |
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v31
with:
nix_path: ${{ env.NIX_PATH }}
- run: |
echo "SPDK_REV=$(nix-instantiate --eval -A libspdk.rev | cut -d '"' -f2)" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: 'recursive'
repository: ${{ github.repository_owner }}/spdk
path: 'spdk'
ref: ${{ env.SPDK_REV }}
- 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"
# - name: Setup tmate session
# if: ${{ failure() }}
# timeout-minutes: 120
# uses: mxschmitt/action-tmate@v3

nix-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: |
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
- uses: cachix/install-nix-action@v31
with:
nix_path: ${{ env.NIX_PATH }}
- name: nix-shell
run: nix-shell --pure -p nixpkgs-fmt --run "nixpkgs-fmt --check ."
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Lint Commit Messages

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
push:
branches:
- staging

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install CommitLint and Dependencies
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/pr-code-lint.yaml

This file was deleted.

1 change: 0 additions & 1 deletion nix/overlay.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{}:
final: prev: rec {
fio = prev.callPackage ./pkgs/fio { };
astyle = prev.callPackage ./pkgs/astyle { };
Expand Down
1 change: 1 addition & 0 deletions nix/pkgs/libspdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ let
drvAttrs = rec {
pname = spdk.pname;
version = spdk.version;
rev = spdk.rev;

src = [
(fetchFromGitHub {
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
pkgs = import sources.nixpkgs {
overlays = [
(_: _: { inherit sources; })
(import ./nix/overlay.nix { })
(import ./nix/overlay.nix)
];
};

Expand Down