Skip to content

Commit 89646d0

Browse files
committed
lib: import libnvme sources
To simplify the development process, merge the library into the existing nvme-cli git repo. Signed-off-by: Daniel Wagner <[email protected]>
2 parents faf7326 + 81ade08 commit 89646d0

File tree

1,288 files changed

+142260
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,288 files changed

+142260
-0
lines changed

libnvme/.checkpatch.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Checkpatch options.
2+
# REF: https://docs.kernel.org/dev-tools/checkpatch.html
3+
4+
# This isn't actually a Linux kernel tree
5+
--no-tree
6+
7+
--max-line-length=100
8+
9+
--ignore EMAIL_SUBJECT
10+
11+
# FILE_PATH_CHANGES reports this kind of message:
12+
# "added, moved or deleted file(s), does MAINTAINERS need updating?"
13+
--ignore FILE_PATH_CHANGES
14+
15+
16+
# Commit messages might contain a Gerrit Change-Id.
17+
--ignore GERRIT_CHANGE_ID
18+
19+
# Do not check the format of commit messages, as Gerrit's merge commits do not
20+
# preserve it.
21+
--ignore GIT_COMMIT_ID
22+
23+
# Avoid "Does not appear to be a unified-diff format patch" message
24+
--ignore NOT_UNIFIED_DIFF
25+
26+
# Do not warn for __attribute__((XXX)) is used
27+
--ignore PREFER_DEFINED_ATTRIBUTE_MACRO
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/arm-linux-gnueabihf-gcc'
3+
ar = '/usr/arm-linux-gnueabihf/bin/ar'
4+
strip = '/usr/arm-linux-gnueabihf/bin/strip'
5+
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
6+
ld = '/usr/bin/arm-linux/gnueabihf-ld'
7+
exe_wrapper = '/usr/bin/qemu-arm-static'
8+
9+
[properties]
10+
root = '/usr/arm-linux-gnueabihf'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 'arm'
17+
cpu = 'armv7'
18+
endian = 'little'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/powerpc64le-linux-gnu-gcc'
3+
ar = '/usr/powerpc64le-linux-gnu/bin/ar'
4+
strip = '/usr/powerpc64le-linux-gnu/bin/strip'
5+
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'
6+
ld = '/usr/bin/powerpc64le-linux-gnu-ld'
7+
exe_wrapper = '/usr/bin/qemu-ppc64le-static'
8+
9+
[properties]
10+
root = '/usr/powerpc64le-linux-gnu'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 'ppc64'
17+
cpu = ''
18+
endian = 'little'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/s390x-linux-gnu-gcc'
3+
ar = '/usr/s390x-linux-gnu/bin/ar'
4+
strip = '/usr/s390x-linux-gnu/bin/strip'
5+
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
6+
ld = '/usr/bin/s390x-linux-gnu-ld'
7+
exe_wrapper = '/usr/bin/qemu-s390x-static'
8+
9+
[properties]
10+
root = '/usr/s390x-linux-gnu'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 's390x'
17+
cpu = ''
18+
endian = 'big'

libnvme/.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
name: build
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
default:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
compiler: [gcc, clang]
18+
buildtype: [debug, release]
19+
container:
20+
image: ghcr.io/linux-nvme/debian.python:latest
21+
steps:
22+
- uses: actions/checkout@v5
23+
- name: build
24+
run: |
25+
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} -x
26+
- uses: actions/upload-artifact@v5
27+
name: upload logs
28+
if: failure()
29+
with:
30+
name: logs files
31+
path: |
32+
.build-ci/meson-logs/*.txt
33+
34+
cross:
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
include:
39+
- arch: armhf
40+
- arch: s390x
41+
- arch: ppc64le
42+
steps:
43+
- uses: actions/checkout@v5
44+
- name: enable foreign arch
45+
uses: dbhi/qus/action@main
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- name: compile and run unit tests
53+
uses: mosteo-actions/docker-run@v2
54+
with:
55+
image: ghcr.io/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest
56+
guest-dir: /build
57+
host-dir: ${{ github.workspace }}
58+
command: |
59+
scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
60+
params: "--platform linux/amd64"
61+
pull-params: "--platform linux/amd64"
62+
- uses: actions/upload-artifact@v5
63+
name: upload logs
64+
if: failure()
65+
with:
66+
name: log files
67+
path: |
68+
.build-ci/meson-logs/*.txt
69+
70+
libdbus:
71+
name: libdbus
72+
runs-on: ubuntu-latest
73+
container:
74+
image: ghcr.io/linux-nvme/debian:latest
75+
steps:
76+
- uses: actions/checkout@v5
77+
- name: build
78+
run: |
79+
scripts/build.sh -b release -c gcc libdbus
80+
- uses: actions/upload-artifact@v5
81+
name: upload logs
82+
if: failure()
83+
with:
84+
name: log files
85+
path: |
86+
.build-ci/meson-logs/*.txt
87+
88+
fallback-shared-libraries:
89+
name: fallback shared libraries
90+
runs-on: ubuntu-latest
91+
container:
92+
image: ghcr.io/linux-nvme/debian:latest
93+
if: github.ref == 'refs/heads/master'
94+
steps:
95+
- uses: actions/checkout@v5
96+
- name: build
97+
run: |
98+
scripts/build.sh -b release -c gcc fallback
99+
- uses: actions/upload-artifact@v5
100+
if: failure()
101+
with:
102+
name: log files
103+
path: |
104+
.build-ci/meson-logs/*.txt
105+
106+
build-muon:
107+
name: muon minimal static
108+
runs-on: ubuntu-latest
109+
container:
110+
image: ghcr.io/linux-nvme/debian:latest
111+
steps:
112+
- uses: actions/checkout@v5
113+
- name: build
114+
run: |
115+
scripts/build.sh -m muon
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: checkpatch review
2+
on: [pull_request]
3+
jobs:
4+
checkpatch:
5+
name: checkpatch review
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: 'Calculate PR commits + 1'
9+
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
10+
- uses: actions/checkout@v5
11+
with:
12+
ref: ${{ github.event.pull_request.head.sha }}
13+
fetch-depth: 0
14+
- name: Run checkpatch review
15+
uses: webispy/checkpatch-action@v9
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: cleanup python
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
keep-last:
7+
description: "How many recent dev releases to keep"
8+
required: false
9+
default: "5"
10+
dry-run:
11+
description: "Only simulate the deletion (true/false)"
12+
required: false
13+
default: "true"
14+
15+
jobs:
16+
cleanup:
17+
runs-on: ubuntu-latest
18+
environment: pypi
19+
steps:
20+
- name: Install pypi-cleanup
21+
run: pip install pypi-cleanup
22+
23+
- name: Run pypi-cleanup on TestPyPI
24+
env:
25+
PYPI_USERNAME: __token__
26+
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
27+
run: |
28+
pypi-cleanup \
29+
--username "$PYPI_USERNAME" \
30+
--password "$PYPI_PASSWORD" \
31+
--repository-url https://test.pypi.org/legacy/ \
32+
--package libnvme \
33+
--keep ${{ github.event.inputs.keep-last }} \
34+
--version-regex '.*\.dev[0-9]+' \
35+
$([ "${{ github.event.inputs.dry-run }}" == "true" ] && echo "--dry-run")
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: coverage
3+
4+
on:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
code-coverage:
10+
if: github.repository == 'linux-nvme/libnvme'
11+
name: code coverage
12+
runs-on: ubuntu-latest
13+
continue-on-error: true
14+
container:
15+
image: ghcr.io/linux-nvme/debian.python:latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
- name: build
19+
run: |
20+
scripts/build.sh coverage
21+
- uses: codecov/codecov-action@v5
22+
with:
23+
token: ${{ secrets.CODECOV_TOKEN }}
24+
fail_ci_if_error: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: docs
3+
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-docs:
14+
name: build documentation
15+
runs-on: ubuntu-latest
16+
container:
17+
image: ghcr.io/linux-nvme/debian:latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
- name: build
21+
run: |
22+
scripts/build.sh docs

0 commit comments

Comments
 (0)