]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
github: Switch to native arm64 runners 4524/head
authorStéphane Graber <stgraber@stgraber.org>
Thu, 20 Feb 2025 16:27:49 +0000 (11:27 -0500)
committerStéphane Graber <stgraber@stgraber.org>
Thu, 20 Feb 2025 16:27:49 +0000 (11:27 -0500)
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
.github/actions/build/action.yml [deleted file]
.github/actions/testsuite/action.yml [deleted file]
.github/workflows/tests.yml

diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml
deleted file mode 100644 (file)
index cd051da..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-name: Build LXC
-description: Install dependencies and build the codebase
-inputs:
-  compiler:
-    required: true
-  os:
-    required: true
-  variant:
-    required: true
-
-runs:
-  using: "composite"
-  steps:
-    - name: Install dependencies
-      shell: bash
-      run: |
-        echo "::group::Installing dependencies"
-
-        sudo apt-get update -qq
-        sudo apt-get install -qq \
-            ${{ inputs.compiler }} \
-            meson \
-            pkg-config \
-            uuid-runtime \
-            docbook2x \
-            linux-libc-dev \
-            llvm \
-            libapparmor-dev \
-            libcap-dev \
-            libdbus-1-dev \
-            libpam0g-dev \
-            libseccomp-dev \
-            libselinux1-dev
-
-        echo "::endgroup::"
-
-    - name: Compiler version
-      shell: bash
-      env:
-        CC: ${{ inputs.compiler }}
-      run: |
-        echo "::group::Compiler version"
-
-        ${CC} --version
-
-        echo "::endgroup::"
-
-    - name: Build
-      shell: bash
-      env:
-        CC: ${{ inputs.compiler }}
-      run: |
-        echo "::group::Building LXC"
-
-        # Standard build
-        if [ "${{ inputs.variant }}" = "default" ]; then
-            meson setup build \
-                -Dprefix=/usr \
-                -Dtests=true \
-                -Dpam-cgroup=true \
-                -Dtools-multicall=true \
-                -Dwerror=true \
-                -Db_lto_mode=default
-        elif [ "${{ inputs.variant }}" = "sanitizer" ]; then
-            meson setup build \
-                -Dprefix=/usr \
-                -Dtests=true \
-                -Dpam-cgroup=true \
-                -Dtools-multicall=true \
-                -Dwerror=true \
-                -Db_lto_mode=default \
-                -Dio-uring-event-loop=false \
-                -Db_lundef=false \
-                -Db_sanitize=address,undefined
-        fi
-
-        meson compile -C build
-
-        echo "::endgroup::"
diff --git a/.github/actions/testsuite/action.yml b/.github/actions/testsuite/action.yml
deleted file mode 100644 (file)
index 928024d..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-name: Test suite
-description: Runs the testsuite
-inputs:
-  compiler:
-    required: true
-  os:
-    required: true
-  variant:
-    required: true
-runs:
-  using: "composite"
-  steps:
-    - name: Build LXC
-      uses: ./.github/actions/build
-      with:
-        compiler: ${{ inputs.compiler }}
-        os: ${{ inputs.os }}
-        variant: ${{ inputs.variant }}
-
-    - name: Remove existing installation
-      shell: bash
-      run: |
-        echo "::group::Removing existing installation"
-
-        sudo apt-get remove --purge -qq \
-            liblxc1 \
-            liblxc-common \
-            liblxc-dev \
-            lxc-utils
-
-        echo "::endgroup::"
-
-    - name: Install dependencies
-      shell: bash
-      run: |
-        echo "::group::Installing dependencies"
-
-        sudo apt-get install --purge -qq \
-            apparmor \
-            acl \
-            busybox-static \
-            dnsmasq-base \
-            iptables \
-            rsync \
-            uidmap
-
-        echo "::endgroup::"
-
-    - name: Test
-      shell: bash
-      env:
-        CC: ${{ inputs.compiler }}
-      run: |
-        echo "::group::Running the testsuite"
-
-        # Install LXC on the system
-        sudo meson install -C build
-
-        if [ "${{ inputs.variant }}" = "sanitizer" ]; then
-            # Set sanitizer configuration
-            export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:strict_string_checks=1:detect_odr_violation=0"
-            export UBSAN_OPTIONS="print_stacktrace=1:print_summary=1:halt_on_error=1"
-
-            # Disable problematic tests
-            sudo rm /usr/bin/lxc-test-concurrent
-            sudo rm /usr/bin/lxc-test-share-ns
-        fi
-
-        # Bring up systemd units
-        sudo sed -i 's/USE_LXC_BRIDGE="false"/USE_LXC_BRIDGE="true"/' /etc/default/lxc
-        sudo systemctl daemon-reload
-        sudo systemctl restart apparmor
-        sudo systemctl restart lxc-net
-
-        # Undo default ACLs from Github
-        sudo setfacl -b -R /home
-
-        # Run the testsuite
-        git clone --depth=1 https://github.com/lxc/lxc-ci
-        sudo -E lxc-ci/deps/lxc-exercise
-
-        echo "::endgroup::"
index f5b935465f00b8b9db517afef1657ce22fe8e254..dee6c197bb3a4d15865a04c9d79639d66c29d693 100644 (file)
@@ -31,8 +31,8 @@ jobs:
           cat abstractions/container-base.in container-rules > abstractions/container-base
           git diff --exit-code
 
-  testsuite-hosted:
-    name: Test suite (x86_64)
+  testsuite:
+    name: Test suite
     strategy:
       fail-fast: false
       matrix:
@@ -42,51 +42,120 @@ jobs:
         os:
           - ubuntu-22.04
           - ubuntu-24.04
+          - ubuntu-22.04-arm
+          - ubuntu-24.04-arm
         variant:
           - default
           - sanitizer
         exclude:
           - variant: sanitizer
             compiler: gcc
+          - variant: sanitizer
+            os: ubuntu-22.04-arm
+          - variant: sanitizer
+            os: ubuntu-24.04-arm
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout code
         uses: actions/checkout@v4
 
-      - name: Run the testsuite
-        uses: ./.github/actions/testsuite
-        with:
-          compiler: ${{ matrix.compiler }}
-          os: ${{ matrix.os }}
-          variant: ${{ matrix.variant }}
+      - name: Install dependencies
+        run: |
+          sudo apt-get update -qq
+          sudo apt-get install -qq \
+              ${{ matrix.compiler }} \
+              meson \
+              pkg-config \
+              uuid-runtime \
+              docbook2x \
+              linux-libc-dev \
+              llvm \
+              libapparmor-dev \
+              libcap-dev \
+              libdbus-1-dev \
+              libpam0g-dev \
+              libseccomp-dev \
+              libselinux1-dev
 
-  testsuite-self-hosted:
-    name: Test suite (aarch64)
-    strategy:
-      fail-fast: false
-      matrix:
-        compiler:
-          - gcc
-          - clang
-        os:
-          - ubuntu-22.04
-          - ubuntu-24.04
-        variant:
-          - default
-    runs-on:
-      - self-hosted
-      - cpu-4
-      - mem-4G
-      - disk-50G
-      - arch-arm64
-      - image-${{ matrix.os }}
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
+      - name: Compiler version
+        env:
+          CC: ${{ matrix.compiler }}
+        run: |
+          ${CC} --version
+
+      - name: Build
+        env:
+          CC: ${{ matrix.compiler }}
+        run: |
+          # Standard build
+          if [ "${{ matrix.variant }}" = "default" ]; then
+              meson setup build \
+                  -Dprefix=/usr \
+                  -Dtests=true \
+                  -Dpam-cgroup=true \
+                  -Dtools-multicall=true \
+                  -Dwerror=true \
+                  -Db_lto_mode=default
+          elif [ "${{ matrix.variant }}" = "sanitizer" ]; then
+              meson setup build \
+                  -Dprefix=/usr \
+                  -Dtests=true \
+                  -Dpam-cgroup=true \
+                  -Dtools-multicall=true \
+                  -Dwerror=true \
+                  -Db_lto_mode=default \
+                  -Dio-uring-event-loop=false \
+                  -Db_lundef=false \
+                  -Db_sanitize=address,undefined
+          fi
+
+          meson compile -C build
+
+      - name: Remove existing installation
+        run: |
+          sudo apt-get remove --purge -qq \
+              liblxc1 \
+              liblxc-common \
+              liblxc-dev \
+              lxc-utils
+
+      - name: Install dependencies
+        run: |
+          sudo apt-get install --purge -qq \
+              apparmor \
+              acl \
+              busybox-static \
+              dnsmasq-base \
+              iptables \
+              rsync \
+              uidmap
+
+      - name: Test
+        env:
+          CC: ${{ matrix.compiler }}
+        run: |
+          # Install LXC on the system
+          sudo meson install -C build
+
+          if [ "${{ matrix.variant }}" = "sanitizer" ]; then
+              # Set sanitizer configuration
+              export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:strict_string_checks=1:detect_odr_violation=0"
+              export UBSAN_OPTIONS="print_stacktrace=1:print_summary=1:halt_on_error=1"
+
+              # Disable problematic tests
+              sudo rm /usr/bin/lxc-test-concurrent
+              sudo rm /usr/bin/lxc-test-share-ns
+          fi
+
+          # Bring up systemd units
+          sudo sed -i 's/USE_LXC_BRIDGE="false"/USE_LXC_BRIDGE="true"/' /etc/default/lxc
+          sudo systemctl daemon-reload
+          sudo systemctl restart apparmor
+          sudo systemctl restart lxc-net
+
+          # Undo default ACLs from Github
+          sudo setfacl -b -R /home
 
-      - name: Run the testsuite
-        uses: ./.github/actions/testsuite
-        with:
-          compiler: ${{ matrix.compiler }}
-          os: ${{ matrix.os }}
-          variant: ${{ matrix.variant }}
+          # Run the testsuite
+          git clone --depth=1 https://github.com/lxc/lxc-ci
+          sudo -E lxc-ci/deps/lxc-exercise