Add an action to setup Archlinux and use it for the initial setup. The rest of the workflow can stay the same. Signed-off-by: Lucas De Marchi <lucas.de.marchi@xxxxxxxxx> --- .github/actions/setup-archlinux/action.yml | 16 ++++++++++++++++ .github/workflows/main.yml | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/actions/setup-archlinux/action.yml diff --git a/.github/actions/setup-archlinux/action.yml b/.github/actions/setup-archlinux/action.yml new file mode 100644 index 0000000..9b22a9a --- /dev/null +++ b/.github/actions/setup-archlinux/action.yml @@ -0,0 +1,16 @@ +name: 'setup Archlinux' +description: 'Setup an Archlinux container for running CI' +runs: + using: 'composite' + steps: + - name: Install dependencies + shell: bash + run: | + 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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9ad289..3f8eaa6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: | -- 2.45.2