From 370f6a4a13eeb95b4485b61a0d9645bf99ed09cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 18 Dec 2024 15:05:44 -0500 Subject: [PATCH 1/4] github: Update coverity workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- .../workflows/{builds.yml => coverity.yml} | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) rename .github/workflows/{builds.yml => coverity.yml} (69%) diff --git a/.github/workflows/builds.yml b/.github/workflows/coverity.yml similarity index 69% rename from .github/workflows/builds.yml rename to .github/workflows/coverity.yml index cd5d0b03..c4a2091b 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/coverity.yml @@ -1,19 +1,19 @@ -name: Builds +name: Coverity on: push: branches: - - master + - main permissions: contents: read jobs: coverity: - name: Coverity + name: Build and upload runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download Coverity Build Tool run: | @@ -26,28 +26,30 @@ jobs: - name: Install dependencies run: | sudo apt-get update -qq - sudo apt-get install -qq gcc clang - sudo apt-get install -qq libfuse-dev uuid-runtime - sudo apt-get install -qq python3 python3-setuptools - sudo pip3 install meson ninja + sudo apt-get install -qq gcc clang meson + sudo apt-get install -qq libfuse-dev uuid-runtime python3 python3-setuptools - name: Run coverity run: | + # Configure export PATH="$(pwd)/cov-analysis-linux64/bin:${PATH}" + export CFLAGS="-Wall -Werror" + export LDFLAGS="-pthread -lpthread" + BUILD="$(pwd)/build" meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr build/ # Build - cov-build --dir cov-int ninja -C build - tar czvf lxcfs.tgz cov-int + cov-build --dir cov-int ninja -C ${BUILD} + tar czvf upload.tgz cov-int # Submit the results curl \ --form project=lxc/lxcfs \ --form token=${TOKEN} \ --form email=lxc-devel@lists.linuxcontainers.org \ - --form file=@lxcfs.tgz \ - --form version=master \ + --form file=@upload.tgz \ + --form version=main \ --form description="${GITHUB_SHA}" \ https://scan.coverity.com/builds?project=lxc/lxcfs env: From 10c990fd104b02e56cee34497f73a3a8d83f1e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 18 Dec 2024 15:12:38 -0500 Subject: [PATCH 2/4] github: Simplify build action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- .github/actions/build/action.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 8f0879d7..d81764c0 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,12 +1,13 @@ name: Build LXCFS description: Install dependencies and build the codebase inputs: + compiler: + required: true fuse: required: true os: required: true - compiler: - required: true + runs: using: "composite" steps: @@ -14,14 +15,12 @@ runs: shell: bash run: | sudo apt-get update -qq - sudo apt-get install -qq ${{ inputs.compiler }} - sudo apt-get install -qq lib${{ inputs.fuse }}-dev - sudo apt-get install -qq python3 python3-pip python3-setuptools pkg-config uuid-runtime - if [ "${{ inputs.os }}" = "ubuntu-22.04" ]; then - sudo pip3 install meson==0.55.1 ninja - else - sudo pip3 install meson==0.55.1 ninja --break-system-packages - fi + sudo apt-get install -qq \ + ${{ inputs.compiler }} \ + lib${{ inputs.fuse }}-dev \ + meson \ + pkg-config \ + uuid-runtime - name: Compiler version shell: bash @@ -35,5 +34,11 @@ runs: env: CC: ${{ inputs.compiler }} run: | - meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/ + # Standard build + meson setup build \ + -Ddocs=false \ + -Dtests=true \ + -Dinit-script=systemd \ + -Dprefix=/usr \ + -Db_sanitize=address,undefined meson compile -C build From a1f9602d607261f6611f1ab67c7809405b3defa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 18 Dec 2024 15:29:12 -0500 Subject: [PATCH 3/4] github: Update checkout to v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 384e8445..2bd3065d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: ./.github/actions/testsuite with: @@ -55,7 +55,7 @@ jobs: - image-${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: ./.github/actions/testsuite with: @@ -81,7 +81,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: ./.github/actions/build with: From f81944262f0d23025b919ebf714e77403aa1c47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 18 Dec 2024 15:54:09 -0500 Subject: [PATCH 4/4] github: Cleanup testsuite action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- .github/actions/testsuite/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/testsuite/action.yml b/.github/actions/testsuite/action.yml index b013a637..d462201f 100644 --- a/.github/actions/testsuite/action.yml +++ b/.github/actions/testsuite/action.yml @@ -1,12 +1,13 @@ name: Test suite description: Runs the testsuite inputs: + compiler: + required: true fuse: required: true os: required: true - compiler: - required: true + runs: using: "composite" steps: