Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github Workflows and add aarch64 testing #666

Merged
merged 5 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build LXCFS
description: Install dependencies and build the codebase
inputs:
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

- name: Compiler version
shell: bash
env:
CC: ${{ inputs.compiler }}
run: |
${CC} --version

- name: Build
shell: bash
env:
CC: ${{ inputs.compiler }}
run: |
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
meson compile -C build
25 changes: 25 additions & 0 deletions .github/actions/testsuite/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test suite
description: Runs the testsuite
inputs:
fuse:
required: true
os:
required: true
compiler:
required: true
runs:
using: "composite"
steps:
- uses: ./.github/actions/build
with:
compiler: ${{ inputs.compiler }}
fuse: ${{ inputs.fuse }}
os: ${{ inputs.os }}

- name: Test
shell: bash
env:
CC: ${{ inputs.compiler }}
run: |
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh
2 changes: 1 addition & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
jobs:
coverity:
name: Coverity
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
name: Signed-off-by (DCO)
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Get PR Commits
id: 'get-pr-commits'
Expand All @@ -27,7 +27,7 @@ jobs:
permissions:
contents: none
name: Branch target
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check branch target
env:
Expand Down
123 changes: 39 additions & 84 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,102 +7,73 @@ permissions:
contents: read

jobs:
fuse2:
name: FUSE2
testsuite-hosted:
name: Test suite (x86_64)
strategy:
fail-fast: false
matrix:
compiler:
- gcc
- clang
fuse:
- fuse
- fuse3
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- 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==0.55.1 ninja

- name: Compiler version
env:
CC: ${{ matrix.compiler }}
run: |
${CC} --version
- uses: ./.github/actions/testsuite
with:
compiler: ${{ matrix.compiler }}
fuse: ${{ matrix.fuse }}
os: ${{ matrix.os }}

- name: Build
env:
CC: ${{ matrix.compiler }}
run: |
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
meson compile -C build
- name: Test
env:
CC: ${{ matrix.compiler }}
run: |
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh

fuse3:
name: FUSE3
testsuite-self-hosted:
name: Test suite (aarch64)
strategy:
fail-fast: false
matrix:
compiler:
- gcc
- clang
fuse:
- fuse
- fuse3
os:
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}
- ubuntu-24.04
runs-on:
- self-hosted
- cpu-4
- mem-4G
- disk-50G
- arch-arm64
- image-${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo add-apt-repository universe
sudo apt-get update -qq
sudo apt-get install -qq gcc clang
sudo apt-get install -qq libfuse3-dev uuid-runtime
sudo apt-get install -qq python3 python3-setuptools
sudo pip3 install meson==0.55.1 ninja
- uses: ./.github/actions/testsuite
with:
compiler: ${{ matrix.compiler }}
fuse: ${{ matrix.fuse }}
os: ${{ matrix.os }}

- name: Compiler version
env:
CC: ${{ matrix.compiler }}
run: |
${CC} --version

- name: Build
env:
CC: ${{ matrix.compiler }}
run: |
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
meson compile -C build
- name: Test
env:
CC: ${{ matrix.compiler }}
run: |
echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh

live-upgrade-compatibility:
name: Live upgrade test
upgrade-test:
name: Upgrade test
strategy:
fail-fast: false
matrix:
compiler:
- gcc
fuse:
- fuse3
os:
- ubuntu-22.04
- ubuntu-24.04
branch:
- stable-5.0
- stable-6.0
Expand All @@ -112,27 +83,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo add-apt-repository universe
sudo apt-get update -qq
sudo apt-get install -qq gcc clang
sudo apt-get install -qq libfuse3-dev uuid-runtime
sudo apt-get install -qq python3 python3-setuptools
sudo pip3 install meson==0.55.1 ninja

- name: Compiler version
env:
CC: ${{ matrix.compiler }}
run: |
${CC} --version

- name: Build PR head version
env:
CC: ${{ matrix.compiler }}
run: |
meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
meson compile -C build
- uses: ./.github/actions/build
with:
compiler: ${{ matrix.compiler }}
fuse: ${{ matrix.fuse }}
os: ${{ matrix.os }}

- name: Build upstream head version
env:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_proc.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ "$IS_CGROUP_V2" = "1" ]; then

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

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

memory_limit_file=memory.max
else
Expand Down