From 4a6cd46c8eaaedb3a047d83045ea9f0a1bb25734 Mon Sep 17 00:00:00 2001 From: Artem Senichev Date: Sun, 4 Aug 2024 12:15:23 +0300 Subject: [PATCH] ci: Add i386 build check Signed-off-by: Artem Senichev --- .github/workflows/Alpine.yml | 57 +++++++++++++++++++++++++++++ .github/workflows/Arch.yml | 2 +- .github/workflows/Dockerfile.Alpine | 17 +++++++++ .github/workflows/FreeBSD.yml | 2 +- 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/Alpine.yml create mode 100644 .github/workflows/Dockerfile.Alpine diff --git a/.github/workflows/Alpine.yml b/.github/workflows/Alpine.yml new file mode 100644 index 0000000..6931f8e --- /dev/null +++ b/.github/workflows/Alpine.yml @@ -0,0 +1,57 @@ +name: Linux/i386 +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + env: + BUILD_PATH: /tmp/build + INSTALL_PATH: /tmp/install + + steps: + + - name: Check out source code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get swayimg version + run: echo "VERSION=$(git describe --tags --long --always | sed 's/^v//;s/-/./')" >> $GITHUB_OUTPUT + id: version + + - name: Build docker image + run: docker build --tag=swayimg --file=.github/workflows/Dockerfile.Alpine . + + - name: Run docker container + run: docker run --tty --detach --name=swayimg --volume=$PWD:$PWD:ro --workdir=$PWD swayimg + + - name: Configure + run: > + docker exec swayimg + meson setup + -D version=${{steps.version.outputs.VERSION}} + -D heif=enabled + -D bash=enabled + -D exif=enabled + -D gif=enabled + -D jpeg=enabled + -D jxl=auto + -D svg=enabled + -D webp=enabled + -D man=true + -D desktop=true + --prefix=/usr + --werror + ${{ env.BUILD_PATH }} + + - name: Compile and link + run: docker exec swayimg meson compile -C ${{ env.BUILD_PATH }} + + - name: Install + run: > + docker exec swayimg + env DESTDIR=${{ env.INSTALL_PATH }} + meson install -C ${{ env.BUILD_PATH }} + + - name: Run installed + run: docker exec swayimg ${{ env.INSTALL_PATH }}/usr/bin/swayimg --version diff --git a/.github/workflows/Arch.yml b/.github/workflows/Arch.yml index 275666d..ab411fa 100644 --- a/.github/workflows/Arch.yml +++ b/.github/workflows/Arch.yml @@ -1,4 +1,4 @@ -name: Arch Linux +name: Linux/x86_64 on: [push, pull_request] jobs: diff --git a/.github/workflows/Dockerfile.Alpine b/.github/workflows/Dockerfile.Alpine new file mode 100644 index 0000000..811f90a --- /dev/null +++ b/.github/workflows/Dockerfile.Alpine @@ -0,0 +1,17 @@ +FROM i386/alpine:latest + +RUN apk add \ + build-base \ + bash-completion-dev \ + giflib-dev \ + json-c-dev \ + libexif-dev \ + libheif-dev \ + libjpeg-turbo-dev \ + libjxl-dev \ + librsvg-dev \ + libwebp-dev \ + libxkbcommon-dev \ + meson \ + wayland-dev \ + wayland-protocols diff --git a/.github/workflows/FreeBSD.yml b/.github/workflows/FreeBSD.yml index 00c5476..f93a96a 100644 --- a/.github/workflows/FreeBSD.yml +++ b/.github/workflows/FreeBSD.yml @@ -1,4 +1,4 @@ -name: FreeBSD +name: FreeBSD/x86_64 on: [push, pull_request] jobs: