]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: Add Archlinux
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 12 Jul 2024 17:06:42 +0000 (12:06 -0500)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 17 Jul 2024 17:37:51 +0000 (12:37 -0500)
Add an action to setup Archlinux and use it for the initial setup.
The rest of the workflow can stay the same.

Currently the Arch container in docker hub is not very up-to-date with
some expired keys and other keys not yet in the package. Workaround
that by wiping the current db and reinstalling the keyring. As requested
by Emil, add a comment in this part of the github-action about why
that is done.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
.github/actions/setup-archlinux/action.yml [new file with mode: 0644]
.github/workflows/main.yml

diff --git a/.github/actions/setup-archlinux/action.yml b/.github/actions/setup-archlinux/action.yml
new file mode 100644 (file)
index 0000000..10be56b
--- /dev/null
@@ -0,0 +1,20 @@
+name: 'setup Archlinux'
+description: 'Setup an Archlinux container for running CI'
+runs:
+  using: 'composite'
+  steps:
+    - name: Install dependencies
+      shell: bash
+      run: |
+        # Semi-regularly the packager key may have (temporarily) expired.
+        # Somewhat robust solution is to wipe the local keyring and
+        # regenerate/reinstall it prior to any other packages on the system.
+        rm -rf /etc/pacman.d/gnupg
+        pacman-key --init
+        pacman-key --populate
+        pacman --noconfirm -Sy archlinux-keyring
+
+        pacman --noconfirm -Su \
+          linux-headers \
+          scdoc \
+          gtk-doc
index a9ad28924a617e9fe5c29ac651f6ce88fd5a4a3d..3f8eaa6879fa6673975453e45e33887281df5c2a 100644 (file)
@@ -11,14 +11,18 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        container: ['ubuntu:22.04', 'ubuntu:24.04']
+        container: ['ubuntu:22.04', 'ubuntu:24.04', 'archlinux:base-devel']
 
     container:
       image: ${{ matrix.container }}
 
     steps:
       - uses: actions/checkout@v4
+
       - uses: ./.github/actions/setup-ubuntu
+        if: ${{ startsWith(matrix.container, 'ubuntu') }}
+      - uses: ./.github/actions/setup-archlinux
+        if: ${{ startsWith(matrix.container, 'archlinux') }}
 
       - name: configure
         run: |