Skip to content

Commit d99a260

Browse files
authored
Merge pull request #666 from stgraber/main
Update Github Workflows and add aarch64 testing
2 parents 2ace0bc + 124ad8b commit d99a260

File tree

6 files changed

+107
-88
lines changed

6 files changed

+107
-88
lines changed

.github/actions/build/action.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build LXCFS
2+
description: Install dependencies and build the codebase
3+
inputs:
4+
fuse:
5+
required: true
6+
os:
7+
required: true
8+
compiler:
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install dependencies
14+
shell: bash
15+
run: |
16+
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
25+
26+
- name: Compiler version
27+
shell: bash
28+
env:
29+
CC: ${{ inputs.compiler }}
30+
run: |
31+
${CC} --version
32+
33+
- name: Build
34+
shell: bash
35+
env:
36+
CC: ${{ inputs.compiler }}
37+
run: |
38+
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
39+
meson compile -C build

.github/actions/testsuite/action.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test suite
2+
description: Runs the testsuite
3+
inputs:
4+
fuse:
5+
required: true
6+
os:
7+
required: true
8+
compiler:
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- uses: ./.github/actions/build
14+
with:
15+
compiler: ${{ inputs.compiler }}
16+
fuse: ${{ inputs.fuse }}
17+
os: ${{ inputs.os }}
18+
19+
- name: Test
20+
shell: bash
21+
env:
22+
CC: ${{ inputs.compiler }}
23+
run: |
24+
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
25+
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh

.github/workflows/builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
jobs:
1111
coverity:
1212
name: Coverity
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v2

.github/workflows/commits.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
1212
name: Signed-off-by (DCO)
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Get PR Commits
1616
id: 'get-pr-commits'
@@ -27,7 +27,7 @@ jobs:
2727
permissions:
2828
contents: none
2929
name: Branch target
30-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-24.04
3131
steps:
3232
- name: Check branch target
3333
env:

.github/workflows/tests.yml

+39-84
Original file line numberDiff line numberDiff line change
@@ -7,102 +7,73 @@ permissions:
77
contents: read
88

99
jobs:
10-
fuse2:
11-
name: FUSE2
10+
testsuite-hosted:
11+
name: Test suite (x86_64)
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
compiler:
1616
- gcc
1717
- clang
18+
fuse:
19+
- fuse
20+
- fuse3
1821
os:
19-
- ubuntu-20.04
2022
- ubuntu-22.04
23+
- ubuntu-24.04
2124
runs-on: ${{ matrix.os }}
2225
steps:
2326
- name: Checkout code
2427
uses: actions/checkout@v2
2528

26-
- name: Install dependencies
27-
run: |
28-
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==0.55.1 ninja
33-
34-
- name: Compiler version
35-
env:
36-
CC: ${{ matrix.compiler }}
37-
run: |
38-
${CC} --version
29+
- uses: ./.github/actions/testsuite
30+
with:
31+
compiler: ${{ matrix.compiler }}
32+
fuse: ${{ matrix.fuse }}
33+
os: ${{ matrix.os }}
3934

40-
- name: Build
41-
env:
42-
CC: ${{ matrix.compiler }}
43-
run: |
44-
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
45-
meson compile -C build
46-
- name: Test
47-
env:
48-
CC: ${{ matrix.compiler }}
49-
run: |
50-
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
51-
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh
52-
53-
fuse3:
54-
name: FUSE3
35+
testsuite-self-hosted:
36+
name: Test suite (aarch64)
5537
strategy:
5638
fail-fast: false
5739
matrix:
5840
compiler:
5941
- gcc
6042
- clang
43+
fuse:
44+
- fuse
45+
- fuse3
6146
os:
62-
- ubuntu-20.04
6347
- ubuntu-22.04
64-
runs-on: ${{ matrix.os }}
48+
- ubuntu-24.04
49+
runs-on:
50+
- self-hosted
51+
- cpu-4
52+
- mem-4G
53+
- disk-50G
54+
- arch-arm64
55+
- image-${{ matrix.os }}
6556
steps:
6657
- name: Checkout code
6758
uses: actions/checkout@v2
6859

69-
- name: Install dependencies
70-
run: |
71-
sudo add-apt-repository universe
72-
sudo apt-get update -qq
73-
sudo apt-get install -qq gcc clang
74-
sudo apt-get install -qq libfuse3-dev uuid-runtime
75-
sudo apt-get install -qq python3 python3-setuptools
76-
sudo pip3 install meson==0.55.1 ninja
60+
- uses: ./.github/actions/testsuite
61+
with:
62+
compiler: ${{ matrix.compiler }}
63+
fuse: ${{ matrix.fuse }}
64+
os: ${{ matrix.os }}
7765

78-
- name: Compiler version
79-
env:
80-
CC: ${{ matrix.compiler }}
81-
run: |
82-
${CC} --version
83-
84-
- name: Build
85-
env:
86-
CC: ${{ matrix.compiler }}
87-
run: |
88-
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
89-
meson compile -C build
90-
- name: Test
91-
env:
92-
CC: ${{ matrix.compiler }}
93-
run: |
94-
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
95-
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh
96-
97-
live-upgrade-compatibility:
98-
name: Live upgrade test
66+
upgrade-test:
67+
name: Upgrade test
9968
strategy:
10069
fail-fast: false
10170
matrix:
10271
compiler:
10372
- gcc
73+
fuse:
74+
- fuse3
10475
os:
105-
- ubuntu-22.04
76+
- ubuntu-24.04
10677
branch:
10778
- stable-5.0
10879
- stable-6.0
@@ -112,27 +83,11 @@ jobs:
11283
- name: Checkout code
11384
uses: actions/checkout@v2
11485

115-
- name: Install dependencies
116-
run: |
117-
sudo add-apt-repository universe
118-
sudo apt-get update -qq
119-
sudo apt-get install -qq gcc clang
120-
sudo apt-get install -qq libfuse3-dev uuid-runtime
121-
sudo apt-get install -qq python3 python3-setuptools
122-
sudo pip3 install meson==0.55.1 ninja
123-
124-
- name: Compiler version
125-
env:
126-
CC: ${{ matrix.compiler }}
127-
run: |
128-
${CC} --version
129-
130-
- name: Build PR head version
131-
env:
132-
CC: ${{ matrix.compiler }}
133-
run: |
134-
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
135-
meson compile -C build
86+
- uses: ./.github/actions/build
87+
with:
88+
compiler: ${{ matrix.compiler }}
89+
fuse: ${{ matrix.fuse }}
90+
os: ${{ matrix.os }}
13691

13792
- name: Build upstream head version
13893
env:

tests/test_proc.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [ "$IS_CGROUP_V2" = "1" ]; then
3737

3838
echo 1 > ${hierarchy_path}/lxcfs_test_proc/cgroup.procs
3939

40-
echo '+cpu +memory' > ${hierarchy_path}/cgroup.subtree_control
40+
echo '+cpu +cpuset +memory' > ${hierarchy_path}/cgroup.subtree_control
4141

4242
memory_limit_file=memory.max
4343
else

0 commit comments

Comments
 (0)