]> git.mdlowis.com Git - proto/labwc.git/commitdiff
CI: add FreeBSD runner
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 23 Jun 2022 20:37:20 +0000 (22:37 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 23 Jun 2022 20:37:20 +0000 (22:37 +0200)
Fixes #413

.github/workflows/build.yml

index e47ad4de4b035c05a867db69f4c00aba3b183154..57c4486958021b5707d4680a50d47343270b3ca9 100644 (file)
@@ -18,17 +18,28 @@ jobs:
       matrix:
         name: [
           Arch,
+          FreeBSD,
           Void-musl
         ]
         include:
           - name: Arch
             os: ubuntu-latest
             container: archlinux:base-devel
+            env:
+              SSH_HOST: ''
+
+          - name: FreeBSD
+            os: macos-10.15
+            env:
+              SSH_HOST: freebsd
 
           - name: Void-musl
             os: ubuntu-latest
             container: ghcr.io/void-linux/void-linux:latest-thin-x86_64-musl
+            env:
+              SSH_HOST: ''
 
+    env: ${{ matrix.env }}
     runs-on: ${{ matrix.os }}
     container: ${{ matrix.container }}
 
@@ -43,6 +54,16 @@ jobs:
           pacman -S --noconfirm git meson clang wlroots libdrm libinput \
             wayland-protocols cairo pango libxml2 xorg-xwayland
 
+      - name: Install FreeBSD dependencies
+        if: matrix.name == 'FreeBSD'
+        uses: vmactions/freebsd-vm@v0.1.5
+        with:
+          usesh: true
+          prepare: |
+            pkg install -y git meson gcc pkgconf cairo pango evdev-proto \
+              wayland-protocols wlroots
+          run: echo "setup done"
+
       - name: Install Void Linux dependencies
         if: matrix.name == 'Void-musl'
         run: |
@@ -58,13 +79,30 @@ jobs:
 
       - name: Build with gcc
         run: |
-          export CC=gcc
-          meson build-gcc/ --werror
-          meson compile -C build-gcc/
+          if test -z "$SSH_HOST"; then
+            export CC=gcc
+            meson build-gcc/ --werror
+            meson compile -C build-gcc/
+          else
+            echo '
+              cd "$GITHUB_WORKSPACE"
+              export CC=gcc
+              meson build-gcc/ --werror
+              meson compile -C build-gcc/
+            ' | ssh "$SSH_HOST" /bin/sh
+          fi
 
       - name: Build with clang
         run: |
-          export CC=clang
-          meson build-clang/ --werror
-          meson compile -C build-clang/
-
+          if test -z "$SSH_HOST"; then
+            export CC=clang
+            meson build-clang/ --werror
+            meson compile -C build-clang/
+          else
+            echo '
+              cd "$GITHUB_WORKSPACE"
+              export CC=clang
+              meson build-clang/ --werror
+              meson compile -C build-clang/
+            ' | ssh "$SSH_HOST" /bin/sh
+          fi