From fc8e26a480c5c6996d091ff49874383bae2b4023 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Mon, 18 Aug 2025 17:58:02 +0300 Subject: [PATCH 1/2] Add OpenBSD job --- .github/workflows/bsd.yml | 46 ++++++++++++++++++++++++++++++++ .github/workflows/haskell-ci.yml | 7 +++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 4e9da3a..1c88090 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -31,6 +31,7 @@ jobs: ls -lah whoami env + df -h freebsd-version sysctl hw.model sysctl hw.ncpu @@ -67,6 +68,7 @@ jobs: ls -lah whoami env + df -h /sbin/sysctl hw.model /sbin/sysctl hw.ncpu /sbin/sysctl hw.physmem @@ -80,3 +82,47 @@ jobs: cabal build all --enable-tests --dry-run cabal build all --enable-tests cabal test all --enable-tests --test-show-details=direct + + openbsd: + name: OpenBSD + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Test in OpenBSD + id: test + uses: vmactions/openbsd-vm@v1 + with: + release: "7.7" + usesh: true + prepare: | + pkg_add ghc cabal-install + + run: | + + date + pwd + ls -lah + whoami + env + df -h + sysctl hw.model + sysctl hw.ncpu + sysctl hw.physmem + sysctl hw.usermem + + + ghc --version + cabal --version + + # OpenBSD image has separate /home partition, / is small + # as we run everything as root, we run out space + # we hack around making cabal write its stuff in /home + mkdir -p /home/cabal + ln -s /home/cabal $HOME/.cabal + + cabal update -v + cabal build all --enable-tests --dry-run + cabal build all --enable-tests + cabal test all --enable-tests --test-show-details=direct diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 7995947..b019d6b 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20250916 +# version: 0.19.20260102 # -# REGENDATA ("0.19.20250916",["github","cabal.project"]) +# REGENDATA ("0.19.20260102",["github","cabal.project"]) # name: Haskell-CI on: @@ -20,6 +20,9 @@ on: pull_request: branches: - master + merge_group: + branches: + - master jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} From 71a8e37a5aad722dff4d62f72f52b2863ee64fe3 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Sun, 29 Jun 2025 14:40:36 +0300 Subject: [PATCH 2/2] Don't include sys/random.h As far as I can trace, Android doesn't need it: https://android.googlesource.com/platform/bionic/+/7110157e941f0895638c81872b535d8781cf79cf OpenBSD doesnt have that header. So lets not include it. Resolves #101 --- cbits-unix/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cbits-unix/init.c b/cbits-unix/init.c index 05fb84c..7e3ce15 100644 --- a/cbits-unix/init.c +++ b/cbits-unix/init.c @@ -1,6 +1,5 @@ #include #include -#include uint64_t splitmix_init() { uint64_t result;