Skip to content

Commit

Permalink
Merge pull request #668 from stgraber/main
Browse files Browse the repository at this point in the history
github: More tweaks
  • Loading branch information
brauner authored Dec 18, 2024
2 parents d99a260 + f819442 commit aed9d38
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 28 deletions.
27 changes: 16 additions & 11 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
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:
- name: Install dependencies
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
Expand All @@ -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
5 changes: 3 additions & 2 deletions .github/actions/testsuite/action.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/builds.yml → .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -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: |
Expand All @@ -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 protected] \
--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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit aed9d38

Please sign in to comment.