Skip to content

Commit aed9d38

Browse files
authored
Merge pull request #668 from stgraber/main
github: More tweaks
2 parents d99a260 + f819442 commit aed9d38

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

.github/actions/build/action.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
name: Build LXCFS
22
description: Install dependencies and build the codebase
33
inputs:
4+
compiler:
5+
required: true
46
fuse:
57
required: true
68
os:
79
required: true
8-
compiler:
9-
required: true
10+
1011
runs:
1112
using: "composite"
1213
steps:
1314
- name: Install dependencies
1415
shell: bash
1516
run: |
1617
sudo apt-get update -qq
17-
sudo apt-get install -qq ${{ inputs.compiler }}
18-
sudo apt-get install -qq lib${{ inputs.fuse }}-dev
19-
sudo apt-get install -qq python3 python3-pip python3-setuptools pkg-config uuid-runtime
20-
if [ "${{ inputs.os }}" = "ubuntu-22.04" ]; then
21-
sudo pip3 install meson==0.55.1 ninja
22-
else
23-
sudo pip3 install meson==0.55.1 ninja --break-system-packages
24-
fi
18+
sudo apt-get install -qq \
19+
${{ inputs.compiler }} \
20+
lib${{ inputs.fuse }}-dev \
21+
meson \
22+
pkg-config \
23+
uuid-runtime
2524
2625
- name: Compiler version
2726
shell: bash
@@ -35,5 +34,11 @@ runs:
3534
env:
3635
CC: ${{ inputs.compiler }}
3736
run: |
38-
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
37+
# Standard build
38+
meson setup build \
39+
-Ddocs=false \
40+
-Dtests=true \
41+
-Dinit-script=systemd \
42+
-Dprefix=/usr \
43+
-Db_sanitize=address,undefined
3944
meson compile -C build

.github/actions/testsuite/action.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: Test suite
22
description: Runs the testsuite
33
inputs:
4+
compiler:
5+
required: true
46
fuse:
57
required: true
68
os:
79
required: true
8-
compiler:
9-
required: true
10+
1011
runs:
1112
using: "composite"
1213
steps:

.github/workflows/builds.yml renamed to .github/workflows/coverity.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Builds
1+
name: Coverity
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66

77
permissions:
88
contents: read
99

1010
jobs:
1111
coverity:
12-
name: Coverity
12+
name: Build and upload
1313
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Download Coverity Build Tool
1919
run: |
@@ -26,28 +26,30 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
sudo apt-get update -qq
29-
sudo apt-get install -qq gcc clang
30-
sudo apt-get install -qq libfuse-dev uuid-runtime
31-
sudo apt-get install -qq python3 python3-setuptools
32-
sudo pip3 install meson ninja
29+
sudo apt-get install -qq gcc clang meson
30+
sudo apt-get install -qq libfuse-dev uuid-runtime python3 python3-setuptools
3331
3432
- name: Run coverity
3533
run: |
34+
# Configure
3635
export PATH="$(pwd)/cov-analysis-linux64/bin:${PATH}"
36+
export CFLAGS="-Wall -Werror"
37+
export LDFLAGS="-pthread -lpthread"
3738
39+
BUILD="$(pwd)/build"
3840
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr build/
3941
4042
# Build
41-
cov-build --dir cov-int ninja -C build
42-
tar czvf lxcfs.tgz cov-int
43+
cov-build --dir cov-int ninja -C ${BUILD}
44+
tar czvf upload.tgz cov-int
4345
4446
# Submit the results
4547
curl \
4648
--form project=lxc/lxcfs \
4749
--form token=${TOKEN} \
4850
49-
--form file=@lxcfs.tgz \
50-
--form version=master \
51+
--form file=@upload.tgz \
52+
--form version=main \
5153
--form description="${GITHUB_SHA}" \
5254
https://scan.coverity.com/builds?project=lxc/lxcfs
5355
env:

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Checkout code
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2828

2929
- uses: ./.github/actions/testsuite
3030
with:
@@ -55,7 +55,7 @@ jobs:
5555
- image-${{ matrix.os }}
5656
steps:
5757
- name: Checkout code
58-
uses: actions/checkout@v2
58+
uses: actions/checkout@v4
5959

6060
- uses: ./.github/actions/testsuite
6161
with:
@@ -81,7 +81,7 @@ jobs:
8181
runs-on: ${{ matrix.os }}
8282
steps:
8383
- name: Checkout code
84-
uses: actions/checkout@v2
84+
uses: actions/checkout@v4
8585

8686
- uses: ./.github/actions/build
8787
with:

0 commit comments

Comments
 (0)