aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMatej Cotman <matej@matejc.com>2025-08-17 11:12:47 +0300
committerGitHub <noreply@github.com>2025-08-17 11:12:47 +0300
commit3b76cb7b3d33d004a4de7466c6f81cdb7e499013 (patch)
tree34463ceb6556886dab614bb54bb17a8bf56d550c /.github/workflows
parent271534e115e5915231c99df287bbfe396185924d (diff)
downloadniri-3b76cb7b3d33d004a4de7466c6f81cdb7e499013.tar.gz
niri-3b76cb7b3d33d004a4de7466c6f81cdb7e499013.tar.bz2
niri-3b76cb7b3d33d004a4de7466c6f81cdb7e499013.zip
Add FreeBSD CI (#2072)
* feat(ci): add FreeBSD job * Update .github/workflows/ci.yml * fix(workflow): remove 10m timeout for freebsd job, put it back later if there is an actual reason * feat(workflow): enable cache on freebsd job * feat(workflow): add custom CARGO_HOME for freebsd job * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * clean-up * test cache --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml44
1 files changed, 43 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8ec56635..93713dff 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,6 +12,7 @@ env:
DEPS_APT: curl gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev libdisplay-info-dev
DEPS_DNF: cargo gcc clang libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel libdisplay-info-devel
DEPS_APK: cargo clang-libclang eudev-dev glib-dev libdisplay-info-dev libinput-dev libseat-dev libxkbcommon-dev mesa-dev pango-dev pipewire-dev tar
+ DEPS_PKG: git curl rust llvm pkgconf pixman libudev-devd libdisplay-info seatd libinput libxkbcommon pipewire mesa-libs cairo devel/glib20 gettext-runtime harfbuzz pango
jobs:
build:
@@ -85,7 +86,7 @@ jobs:
- name: Install Deps
run: apk add --no-cache ${{ env.DEPS_APK }}
-
+
- uses: Swatinem/rust-cache@v2
- name: Build
@@ -231,6 +232,47 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo build --all
+ freebsd:
+ runs-on: ubuntu-24.04
+ env:
+ CARGO_HOME: /home/runner/work/niri/niri/cargo-home
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ show-progress: false
+
+ # Required for the rust-cache action to work.
+ - uses: dtolnay/rust-toolchain@stable
+
+ # FIXME: doesn't seem to cache the builds, only the downloads for some unknown reason.
+ - uses: Swatinem/rust-cache@v2
+ with:
+ cache-all-crates: true
+
+ # Remove man-db triggers to speed up Ubuntu upgrade by a minute or two during vmactions/freebsd-vm action run.
+ - run: |
+ sudo rm /var/lib/dpkg/info/man-db.*
+
+ - name: Build
+ uses: vmactions/freebsd-vm@966989c456d41351f095a421f60e71342d3bce41 # v1.2.1
+ with:
+ prepare: |
+ pkg update -f
+ pkg install -y ${{ env.DEPS_PKG }}
+ run: |
+ curl -o patch-pipewire_init 'https://cgit.freebsd.org/ports/plain/x11-wm/niri/files/patch-pipewire_init?id=f3f7e555b06d9a87d63c047ce3e82e936a11f2fe'
+
+ export CARGO_HOME="$PWD/cargo-home"
+
+ cargo fetch
+
+ ( cd $CARGO_HOME/git/checkouts/pipewire-rs-*/*/; patch -p2 < $CARGO_HOME/../patch-pipewire_init; )
+
+ cargo build \
+ --offline \
+ --no-default-features --features dbus,xdp-gnome-screencast
+
nix:
runs-on: ubuntu-24.04
steps: