summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:41:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:41:32 +0000
commitf26f66d866ba1a9f3204e6fdfe2b07e67b5492ad (patch)
treec953c007cbe4f60a147ab62f97937d58abb2e9ca /.github
parentInitial commit. (diff)
downloadnvme-cli-f26f66d866ba1a9f3204e6fdfe2b07e67b5492ad.tar.xz
nvme-cli-f26f66d866ba1a9f3204e6fdfe2b07e67b5492ad.zip
Adding upstream version 2.8.upstream/2.8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github')
-rw-r--r--.github/AppImageBuilder.yml57
-rw-r--r--.github/azure-pipelines.yml38
-rw-r--r--.github/codeql/codeql-config.yml3
-rw-r--r--.github/cross/ubuntu-cross-armhf.txt18
-rw-r--r--.github/cross/ubuntu-cross-ppc64le.txt18
-rw-r--r--.github/cross/ubuntu-cross-s390x.txt18
-rw-r--r--.github/dependabot.yml7
-rw-r--r--.github/workflows/appimage.yml56
-rw-r--r--.github/workflows/build.yml101
-rw-r--r--.github/workflows/checkpatch.yml15
-rw-r--r--.github/workflows/codeql.yml71
-rw-r--r--.github/workflows/coverage.yml22
-rw-r--r--.github/workflows/release.yml20
13 files changed, 444 insertions, 0 deletions
diff --git a/.github/AppImageBuilder.yml b/.github/AppImageBuilder.yml
new file mode 100644
index 0000000..cce4689
--- /dev/null
+++ b/.github/AppImageBuilder.yml
@@ -0,0 +1,57 @@
+# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
+version: 1
+script:
+ # Ensure that the mksquashfs tool is installed (workaround for the AppImageCrafters/build-appimage GHA)
+ - which mksquashfs || apt install squashfs-tools
+ # fake icons
+ - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps
+ - touch AppDir/usr/share/icons/hicolor/64x64/apps/nvme-cli.png
+
+AppDir:
+ path: AppDir
+ app_info:
+ id: linux-nvme.nvme-cli
+ name: nvme-cli
+ version: latest
+ icon: nvme-cli
+ exec: usr/sbin/nvme
+ exec_args: $@
+ apt:
+ arch: amd64
+ allow_unauthenticated: true
+ sources:
+ - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
+ key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
+ - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
+ - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
+ - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
+ include:
+ - libjson-c5
+ - libssl3
+ files:
+ include:
+ - libcrypt.so.3
+ - libdbus-1.so.3
+ - libjson-c.so.5
+ exclude:
+ - usr/share/man
+ - usr/share/doc
+ test:
+ fedora-30:
+ image: appimagecrafters/tests-env:fedora-30
+ command: ./AppRun
+ debian-stable:
+ image: appimagecrafters/tests-env:debian-stable
+ command: ./AppRun
+ archlinux-latest:
+ image: appimagecrafters/tests-env:archlinux-latest
+ command: ./AppRun
+ centos-7:
+ image: appimagecrafters/tests-env:centos-7
+ command: ./AppRun
+ ubuntu-xenial:
+ image: appimagecrafters/tests-env:ubuntu-xenial
+ command: ./AppRun
+AppImage:
+ update-information: 'gh-releases-zsync|linux-nvme|nvme-cli|latest|*x86_64.AppImage.zsync'
+ arch: x86_64
diff --git a/.github/azure-pipelines.yml b/.github/azure-pipelines.yml
new file mode 100644
index 0000000..f9eb5ed
--- /dev/null
+++ b/.github/azure-pipelines.yml
@@ -0,0 +1,38 @@
+---
+# Do not run following tests
+# - exclude data varification tests, too slow
+# - nvme/010
+# - nvme/011
+# - nvme/012
+# - nvme/013
+
+trigger:
+ - master
+pr:
+ - master
+
+jobs:
+ - job: blktests
+ timeoutInMinutes: 5
+ pool:
+ name: linux-nvme
+ steps:
+ - script: |
+ meson $(Agent.TempDirectory)/build
+ ninja -C $(Agent.TempDirectory)/build
+ displayName: Build nvme-cli
+ - script: |
+ git clone --depth 1 https://github.com/osandov/blktests.git $(Agent.TempDirectory)/blktests
+ displayName: Clone blktests
+ - script: |
+ cd $(Agent.TempDirectory)/blktests
+ sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=tcp ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
+ displayName: Run blktests for NVMe transport TCP
+ - script: |
+ cd $(Agent.TempDirectory)/blktests
+ sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=rdma ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
+ displayName: Run blktests for NVMe transport RDMA
+ - script: |
+ cd $(Agent.TempDirectory)/blktests
+ sudo sh -c 'PATH=$(Agent.TempDirectory)/build:$PATH nvme_trtype=fc ./check -x nvme/010 -x nvme/011 -x nvme/012 -x nvme/013 nvme'
+ displayName: Run blktests for NVMe transport FC
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 0000000..d9079fd
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,3 @@
+name: "CodeQL Config"
+paths-ignore:
+ - subprojects/**
diff --git a/.github/cross/ubuntu-cross-armhf.txt b/.github/cross/ubuntu-cross-armhf.txt
new file mode 100644
index 0000000..41c8328
--- /dev/null
+++ b/.github/cross/ubuntu-cross-armhf.txt
@@ -0,0 +1,18 @@
+[binaries]
+c = '/usr/bin/arm-linux-gnueabihf-gcc'
+ar = '/usr/arm-linux-gnueabihf/bin/ar'
+strip = '/usr/arm-linux-gnueabihf/bin/strip'
+pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
+ld = '/usr/bin/arm-linux/gnueabihf-ld'
+exe_wrapper = '/usr/bin/qemu-arm-static'
+
+[properties]
+root = '/usr/arm-linux-gnueabihf'
+has_function_printf = true
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7'
+endian = 'little'
diff --git a/.github/cross/ubuntu-cross-ppc64le.txt b/.github/cross/ubuntu-cross-ppc64le.txt
new file mode 100644
index 0000000..6baaefb
--- /dev/null
+++ b/.github/cross/ubuntu-cross-ppc64le.txt
@@ -0,0 +1,18 @@
+[binaries]
+c = '/usr/bin/powerpc64le-linux-gnu-gcc'
+ar = '/usr/powerpc64le-linux-gnu/bin/ar'
+strip = '/usr/powerpc64le-linux-gnu/bin/strip'
+pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'
+ld = '/usr/bin/powerpc64le-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-ppc64le-static'
+
+[properties]
+root = '/usr/powerpc64le-linux-gnu'
+has_function_printf = true
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 'ppc64'
+cpu = ''
+endian = 'little'
diff --git a/.github/cross/ubuntu-cross-s390x.txt b/.github/cross/ubuntu-cross-s390x.txt
new file mode 100644
index 0000000..51a3511
--- /dev/null
+++ b/.github/cross/ubuntu-cross-s390x.txt
@@ -0,0 +1,18 @@
+[binaries]
+c = '/usr/bin/s390x-linux-gnu-gcc'
+ar = '/usr/s390x-linux-gnu/bin/ar'
+strip = '/usr/s390x-linux-gnu/bin/strip'
+pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
+ld = '/usr/bin/s390x-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-s390x-static'
+
+[properties]
+root = '/usr/s390x-linux-gnu'
+has_function_printf = true
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 's390x'
+cpu = ''
+endian = 'big'
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..23c4cb3
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
+---
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml
new file mode 100644
index 0000000..6c0d3e5
--- /dev/null
+++ b/.github/workflows/appimage.yml
@@ -0,0 +1,56 @@
+---
+name: appimage
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+env:
+ DESTDIR: ../AppDir
+
+jobs:
+ build-appimage:
+ name: build AppImage
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ scripts/build.sh appimage
+ - name: build AppImage
+ uses: AppImageCrafters/build-appimage@v1.3
+ with:
+ recipe: .github/AppImageBuilder.yml
+ - uses: actions/upload-artifact@v4
+ name: upload artifacts to github
+ with:
+ name: AppImage
+ path: '*.AppImage*'
+
+ deploy-appimage:
+ name: deploy AppImage
+ runs-on: ubuntu-latest
+ needs: build-appimage
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'linux-nvme/nvme-cli' }}
+ steps:
+ - name: Download artifact
+ uses: dawidd6/action-download-artifact@v3
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ workflow_conclusion: success
+ - name: FTP Deployer
+ uses: sand4rt/ftp-deployer@v1.7
+ with:
+ sftp: true
+ host: ${{ secrets.SFTP_SERVER }}
+ port: 22
+ username: ${{ secrets.SFTP_USERNAME }}
+ password: ${{ secrets.SFTP_PASSWORD }}
+ remote_folder: '/upload'
+ local_folder: '.'
+ cleanup: false
+ include: '[ "*", "**/*" ]'
+ exclude: '[".github/**", ".git/**", "*.env"]'
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..0b12517
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,101 @@
+---
+name: build
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+ workflow_dispatch:
+
+jobs:
+ default:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ compiler: [gcc, clang]
+ buildtype: [debug, release]
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian.python:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }}
+ - uses: actions/upload-artifact@v4
+ name: upload logs
+ if: failure()
+ with:
+ name: logs files
+ path: |
+ .build-ci/meson-logs/*.txt
+
+ cross:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ include:
+ - arch: armhf
+ - arch: s390x
+ - arch: ppc64le
+ steps:
+ - uses: actions/checkout@v4
+ - name: enable foreign arch
+ uses: dbhi/qus/action@main
+ - name: compile and run unit tests
+ uses: mosteo-actions/docker-run@v1
+ with:
+ image: ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest
+ guest-dir: /build
+ host-dir: ${{ github.workspace }}
+ command: |
+ scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
+ params: "--platform linux/amd64"
+ pull-params: "--platform linux/amd64"
+ - uses: actions/upload-artifact@v4
+ name: upload logs
+ if: failure()
+ with:
+ name: log files
+ path: |
+ .build-ci/meson-logs/*.txt
+
+ fallback-shared-libraries:
+ name: fallback shared libraries
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:latest
+ if: github.ref == 'refs/heads/master'
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ scripts/build.sh -b release -c gcc fallback
+ - uses: actions/upload-artifact@v4
+ if: failure()
+ with:
+ name: log files
+ path: |
+ .build-ci/meson-logs/*.txt
+
+ build-muon:
+ name: muon minimal static
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ scripts/build.sh -m muon
+ build-make-static:
+ name: make static
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ make static
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml
new file mode 100644
index 0000000..c0a09b7
--- /dev/null
+++ b/.github/workflows/checkpatch.yml
@@ -0,0 +1,15 @@
+name: checkpatch review
+on: [pull_request]
+jobs:
+ checkpatch:
+ name: checkpatch review
+ runs-on: ubuntu-latest
+ steps:
+ - name: 'Calculate PR commits + 1'
+ run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ fetch-depth: 0
+ - name: Run checkpatch review
+ uses: webispy/checkpatch-action@v9
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..d57e17a
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,71 @@
+# CodeQL build configuration for nvme-cli
+# Mostly based on auto-configuration with additions and tweaks for:
+# * meson install
+# * language detection
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "master" ]
+ schedule:
+ - cron: '24 2 * * 5'
+
+jobs:
+ analyze:
+ name: Analyze
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
+ # - https://gh.io/supported-runners-and-hardware-resources
+ # - https://gh.io/using-larger-runners
+ # Consider using larger runners for possible analysis time improvements.
+ runs-on: 'ubuntu-latest'
+ timeout-minutes: 360
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'c-cpp', 'python' ]
+ # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
+ # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install build tools
+ run: |
+ sudo apt-get update
+ sudo apt-get install meson
+
+ # Initializes the CodeQL tools for scanning.
+ - if: matrix.language == 'c-cpp'
+ name: Initialize CodeQL C
+ uses: github/codeql-action/init@v3
+ with:
+ languages: 'c-cpp'
+
+ - if: matrix.language == 'python'
+ name: Initialize CodeQL Python
+ uses: github/codeql-action/init@v3
+ with:
+ languages: 'python'
+ config-file: ./.github/codeql/codeql-config.yml
+
+ - name: meson build
+ run: |
+ meson setup --force-fallback-for=libnvme,json-c .build
+ ninja -C .build
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 0000000..875ed6d
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,22 @@
+---
+name: coverage
+
+on:
+ push:
+ branches: [master]
+
+jobs:
+ code-coverage:
+ if: github.repository == 'linux-nvme/nvme-cli'
+ name: code coverage
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian.python:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ scripts/build.sh coverage
+ - uses: codecov/codecov-action@v4
+ with:
+ fail_ci_if_error: false
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..8a5651c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,20 @@
+---
+name: release
+
+on:
+ push:
+ branches: [ master ]
+ tags:
+ - '**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/nvme-cli'
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ncipollo/release-action@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}