Skip to content

Commit 3ddda09

Browse files
committed
ci: fix libvmi-setup compatibility with manylinux container
1 parent e756221 commit 3ddda09

2 files changed

Lines changed: 61 additions & 28 deletions

File tree

Lines changed: 60 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,65 @@
1-
name: 'Libvmi setup'
2-
description: 'This actions installs LibVMI on the system'
3-
author: 'Mathieu Tarral'
1+
name: "Libvmi setup"
2+
description: "This actions installs LibVMI on the system"
3+
author: "Mathieu Tarral"
44
runs:
5-
using: 'composite'
6-
steps:
7-
- name: Ensure sudo is available (manylinux container compat)
8-
shell: bash
9-
run: |
10-
if [ "$EUID" -eq 0 ]; then
11-
apt-get update && apt-get install -y sudo
12-
fi
5+
using: "composite"
6+
steps:
7+
- name: Detect OS and Set Environment Variable
8+
id: detect-os
9+
shell: bash
10+
run: |
11+
. /etc/os-release
12+
if [ "$ID" = "ubuntu" ]; then
13+
echo "OS_TYPE=Ubuntu" >> $GITHUB_ENV
14+
elif [ "$ID" = "almalinux" ]; then
15+
echo "OS_TYPE=CentOS" >> $GITHUB_ENV
16+
else
17+
echo "Unsupported OS: $ID"
18+
exit 1
19+
fi
1320
14-
- name: install dependencies
15-
shell: bash
16-
run: sudo apt-get update && sudo apt-get install -qq cmake flex bison libglib2.0-dev libvirt-dev libjson-c-dev libyajl-dev
21+
- name: install dependencies
22+
shell: bash
23+
run: |
24+
if [ "${{ env.OS_TYPE }}" = "Ubuntu" ]; then
25+
sudo apt-get update && sudo apt-get install -qq cmake flex bison libglib2.0-dev libvirt-dev libjson-c-dev libyajl-dev
26+
elif [ "${{ env.OS_TYPE }}" = "CentOS" ]; then
27+
yum update && yum install -y cmake flex bison glib2-devel libvirt-devel json-c-devel yajl-devel
28+
else
29+
echo "Unknown OS"
30+
fi
1731
18-
- name: clone libvmi
19-
uses: actions/checkout@v2
20-
with:
21-
repository: libvmi/libvmi
22-
path: libvmi
23-
# pinned to a specific commit to avoid breakage
24-
ref: '45b32c0f0003b4037700a1b534879b7d8bee5de0'
32+
- name: install Xen headers for CentOS
33+
shell: bash
34+
run: |
35+
if [ "${{ env.OS_TYPE }}" = "CentOS" ]; then
36+
yum groupinstall -y "Development Tools"
37+
yum install -y python3-devel iasl libuuid-devel ncurses-devel pixman-devel yajl-devel ninja-build
38+
git clone --depth 1 https://github.com/xen-project/xen.git -b RELEASE-4.18.0
39+
cd xen
40+
./configure --disable-docs --disable-stubdom
41+
make -j $(nproc)
42+
make install
43+
fi
2544
26-
- name: install libvmi
27-
shell: bash
28-
run: |
29-
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr .
30-
cmake --build build
45+
- name: clone libvmi
46+
uses: actions/checkout@v2
47+
with:
48+
repository: libvmi/libvmi
49+
path: libvmi
50+
# pinned to a specific commit to avoid breakage
51+
ref: "45b32c0f0003b4037700a1b534879b7d8bee5de0"
52+
53+
- name: install libvmi
54+
shell: bash
55+
run: |
56+
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr .
57+
cmake --build build
58+
if [ "${{ env.OS_TYPE }}" = "Ubuntu" ]; then
3159
sudo cmake --build build --target install
32-
working-directory: libvmi
60+
elif [ "${{ env.OS_TYPE }}" = "CentOS" ] || [ "${{ env.OS_TYPE }}" = "Debian" ]; then
61+
cmake --build build --target install
62+
else
63+
echo "Unknown OS"
64+
fi
65+
working-directory: libvmi

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
publish:
7171
runs-on: ubuntu-latest
7272
needs: [build]
73-
container: quay.io/pypa/manylinux2014_x86_64
73+
container: quay.io/pypa/manylinux_2_28_x86_64
7474
strategy:
7575
matrix:
7676
python: ['3.7', '3.8', '3.9', '3.10', '3.11']

0 commit comments

Comments
 (0)