From f55e86b071cb72cf616a9e86a6df9a2acd78af3c Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 29 Sep 2023 17:07:10 +0200 Subject: [PATCH 1/8] CI: fix libvmi build --- .github/actions/libvmi-setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/libvmi-setup/action.yml b/.github/actions/libvmi-setup/action.yml index 3f13a0e..62e2f11 100644 --- a/.github/actions/libvmi-setup/action.yml +++ b/.github/actions/libvmi-setup/action.yml @@ -13,7 +13,7 @@ runs: - name: install dependencies shell: bash - run: sudo apt-get update && sudo apt-get install -qq cmake bison flex check libjson-c-dev libglib2.0-dev libxenstore3.0 libxen-dev libvirt-dev + run: sudo apt-get update && sudo apt-get install -qq cmake flex bison libglib2.0-dev libvirt-dev libjson-c-dev libyajl-dev - name: clone libvmi uses: actions/checkout@v2 From 0fc8dcdf12971c906a4dc641c30d9a868ff70319 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 29 Sep 2023 17:09:14 +0200 Subject: [PATCH 2/8] CI: deprecate Python 3.6 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18a9245..173ac62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.6', '3.7', '3.8', '3.9'] + python: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v2 @@ -73,7 +73,7 @@ jobs: container: quay.io/pypa/manylinux_2_24_x86_64 strategy: matrix: - python: ['3.6', '3.7', '3.8', '3.9'] + python: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v2 From 5b165b05f0bd7457632654b9408b134ad06c7cab Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 29 Sep 2023 17:11:44 +0200 Subject: [PATCH 3/8] CI: upgrade actions/checkout --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 173ac62..3c896eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.7 🐍 uses: actions/setup-python@v1 @@ -33,7 +33,7 @@ jobs: python: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: path: python-libvmi From ddff860f728ec5ea70eac68afc0977d1da9f7e08 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 29 Sep 2023 17:12:33 +0200 Subject: [PATCH 4/8] CI: use setup-python@v4 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c896eb..4b50c73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.7 🐍 - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.7' @@ -41,7 +41,7 @@ jobs: uses: ./python-libvmi/.github/actions/libvmi-setup - name: Set up Python 🐍 - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} From e7562212308eb703a9c636f0f6b50778d6bf3523 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Fri, 29 Sep 2023 17:25:20 +0200 Subject: [PATCH 5/8] CI: use manylinux2014_x86_64 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b50c73..e487a1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: publish: runs-on: ubuntu-latest needs: [build] - container: quay.io/pypa/manylinux_2_24_x86_64 + container: quay.io/pypa/manylinux2014_x86_64 strategy: matrix: python: ['3.7', '3.8', '3.9', '3.10', '3.11'] From 3ddda0957bf73ed1369739437173ff28c635c019 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Tue, 5 Dec 2023 10:40:47 +0100 Subject: [PATCH 6/8] ci: fix libvmi-setup compatibility with manylinux container --- .github/actions/libvmi-setup/action.yml | 87 +++++++++++++++++-------- .github/workflows/ci.yml | 2 +- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/.github/actions/libvmi-setup/action.yml b/.github/actions/libvmi-setup/action.yml index 62e2f11..c5039a2 100644 --- a/.github/actions/libvmi-setup/action.yml +++ b/.github/actions/libvmi-setup/action.yml @@ -1,32 +1,65 @@ -name: 'Libvmi setup' -description: 'This actions installs LibVMI on the system' -author: 'Mathieu Tarral' +name: "Libvmi setup" +description: "This actions installs LibVMI on the system" +author: "Mathieu Tarral" runs: - using: 'composite' - steps: - - name: Ensure sudo is available (manylinux container compat) - shell: bash - run: | - if [ "$EUID" -eq 0 ]; then - apt-get update && apt-get install -y sudo - fi + using: "composite" + steps: + - name: Detect OS and Set Environment Variable + id: detect-os + shell: bash + run: | + . /etc/os-release + if [ "$ID" = "ubuntu" ]; then + echo "OS_TYPE=Ubuntu" >> $GITHUB_ENV + elif [ "$ID" = "almalinux" ]; then + echo "OS_TYPE=CentOS" >> $GITHUB_ENV + else + echo "Unsupported OS: $ID" + exit 1 + fi - - name: install dependencies - shell: bash - run: sudo apt-get update && sudo apt-get install -qq cmake flex bison libglib2.0-dev libvirt-dev libjson-c-dev libyajl-dev + - name: install dependencies + shell: bash + run: | + if [ "${{ env.OS_TYPE }}" = "Ubuntu" ]; then + sudo apt-get update && sudo apt-get install -qq cmake flex bison libglib2.0-dev libvirt-dev libjson-c-dev libyajl-dev + elif [ "${{ env.OS_TYPE }}" = "CentOS" ]; then + yum update && yum install -y cmake flex bison glib2-devel libvirt-devel json-c-devel yajl-devel + else + echo "Unknown OS" + fi - - name: clone libvmi - uses: actions/checkout@v2 - with: - repository: libvmi/libvmi - path: libvmi - # pinned to a specific commit to avoid breakage - ref: '45b32c0f0003b4037700a1b534879b7d8bee5de0' + - name: install Xen headers for CentOS + shell: bash + run: | + if [ "${{ env.OS_TYPE }}" = "CentOS" ]; then + yum groupinstall -y "Development Tools" + yum install -y python3-devel iasl libuuid-devel ncurses-devel pixman-devel yajl-devel ninja-build + git clone --depth 1 https://github.com/xen-project/xen.git -b RELEASE-4.18.0 + cd xen + ./configure --disable-docs --disable-stubdom + make -j $(nproc) + make install + fi - - name: install libvmi - shell: bash - run: | - cmake -B build -DCMAKE_INSTALL_PREFIX=/usr . - cmake --build build + - name: clone libvmi + uses: actions/checkout@v2 + with: + repository: libvmi/libvmi + path: libvmi + # pinned to a specific commit to avoid breakage + ref: "45b32c0f0003b4037700a1b534879b7d8bee5de0" + + - name: install libvmi + shell: bash + run: | + cmake -B build -DCMAKE_INSTALL_PREFIX=/usr . + cmake --build build + if [ "${{ env.OS_TYPE }}" = "Ubuntu" ]; then sudo cmake --build build --target install - working-directory: libvmi + elif [ "${{ env.OS_TYPE }}" = "CentOS" ] || [ "${{ env.OS_TYPE }}" = "Debian" ]; then + cmake --build build --target install + else + echo "Unknown OS" + fi + working-directory: libvmi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e487a1c..8a55d9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: publish: runs-on: ubuntu-latest needs: [build] - container: quay.io/pypa/manylinux2014_x86_64 + container: quay.io/pypa/manylinux_2_28_x86_64 strategy: matrix: python: ['3.7', '3.8', '3.9', '3.10', '3.11'] From 98e19001a9cbfa997c374d0a1ccf7c1f14185c56 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Tue, 5 Dec 2023 13:38:11 +0100 Subject: [PATCH 7/8] ci: pin latest libvmi master --- .github/actions/libvmi-setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/libvmi-setup/action.yml b/.github/actions/libvmi-setup/action.yml index c5039a2..67e6148 100644 --- a/.github/actions/libvmi-setup/action.yml +++ b/.github/actions/libvmi-setup/action.yml @@ -48,7 +48,7 @@ runs: repository: libvmi/libvmi path: libvmi # pinned to a specific commit to avoid breakage - ref: "45b32c0f0003b4037700a1b534879b7d8bee5de0" + ref: "e7074407fc3b98db1aa73f918b3720bd4438734b" - name: install libvmi shell: bash From ce9caa7ab37e4da296141482a219bc87583c0c82 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Tue, 5 Dec 2023 13:53:17 +0100 Subject: [PATCH 8/8] ci: restrict publishing --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a55d9f..2eae3ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,3 +101,4 @@ jobs: user: __token__ password: ${{ secrets.ACCESS_TOKEN }} packages_dir: manylinux + if: startsWith(github.ref, 'refs/tags/v')