From 8d843cc9cc0e989d3929f204f77223cd08730c7a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 24 Dec 2023 08:51:48 +0100 Subject: Merging upstream version 1.7.1. Signed-off-by: Daniel Baumann --- .github/workflows/build.yml | 70 +++++++++++++----------------------- .github/workflows/checkpatch.yml | 15 ++++++++ .github/workflows/coverage.yml | 30 ++++------------ .github/workflows/release-python.yml | 16 +++++---- .github/workflows/release.yml | 4 +-- 5 files changed, 58 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/checkpatch.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a9a369..df79f65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,16 +17,13 @@ jobs: compiler: [gcc, clang] buildtype: [debug, release] container: - image: ghcr.io/igaw/linux-nvme/debian:0.30 + image: ghcr.io/igaw/linux-nvme/debian.python:latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' + - uses: actions/checkout@v4 - name: build run: | scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 name: upload logs if: failure() with: @@ -40,34 +37,23 @@ jobs: matrix: include: - arch: armhf - port: armhf - compiler: gcc-arm-linux-gnueabihf - packages: - arch: s390x - port: s390x - compiler: gcc-s390x-linux-gnu - packages: libgcc-s1:s390x - arch: ppc64le - port: ppc64el - compiler: gcc-powerpc64le-linux-gnu - packges: steps: - - uses: actions/checkout@v3 - - name: set up arm architecture - run: | - export release=$(lsb_release -c -s) - sudo dpkg --add-architecture ${{ matrix.port }} - sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list - sudo dd of=/etc/apt/sources.list.d/${{ matrix.arch }}.list <> $GITHUB_ENV + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} + - name: Run checkpatch review + uses: webispy/checkpatch-action@v9 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e26ffab..3ed1f99 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,32 +7,16 @@ on: jobs: code-coverage: + if: github.repository == 'linux-nvme/libnvme' name: code coverage runs-on: ubuntu-latest + container: + image: ghcr.io/igaw/linux-nvme/debian.python:latest steps: - - name: install libraries - run: sudo apt-get install libjson-c-dev libdbus-1-dev lcov - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - uses: BSFishy/meson-build@v1.0.3 - with: - # Can't use 'coverage' here, see - # https://github.com/BSFishy/meson-build/issues/4 - action: test - options: --verbose - setup-options: > - --werror - --buildtype=release - --wrap-mode=nofallback - -Dlibdbus=enabled - -Db_coverage=true - meson-version: 0.61.2 - - name: Generate Coverage Report - # Can't use meson here, see - # https://github.com/mesonbuild/meson/issues/7895 - run: ninja -C build coverage --verbose + - uses: actions/checkout@v4 + - name: build + run: | + scripts/build.sh coverage - uses: codecov/codecov-action@v3 with: fail_ci_if_error: false diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 86dc0de..57f36e7 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -15,16 +15,18 @@ jobs: build_sdist: name: Build source distribution runs-on: ubuntu-latest + container: + image: ghcr.io/igaw/linux-nvme/debian.python:latest steps: - - name: install libraries - run: sudo apt-get install gcc pkg-config libjson-c-dev libssl-dev python3-dev + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - name: Allow workspace + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Build sdist run: pipx run build --sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz retention-days: 5 @@ -34,7 +36,7 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist @@ -49,7 +51,7 @@ jobs: upload_pypi: needs: [build_sdist] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/libnvme' steps: - name: Check if it is a release tag id: check-tag @@ -58,7 +60,7 @@ jobs: echo ::set-output name=match::true fi - name: Download artifiact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 if: steps.check-tag.outputs.match == 'true' with: name: artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ca2741..d4ef038 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,11 +10,11 @@ on: jobs: build: runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/libnvme' permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} -- cgit v1.2.3