From f43bf9079818704a83a6bfb043278ac0fbc35ad9 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Tue, 1 Oct 2024 23:58:07 +0200 Subject: [PATCH] enable openbsd --- .github/workflows/bsd.yml | 35 ++++++++++++++++------------------- Makefile | 8 ++++++-- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml index 58e6107cc..6e28c8f49 100644 --- a/.github/workflows/bsd.yml +++ b/.github/workflows/bsd.yml @@ -32,24 +32,21 @@ jobs: set -e gmake install-sysdeps install-pydeps install print-sysinfo test test-memleaks -# openbsd: -# runs-on: ubuntu-22.04 -# steps: -# - uses: actions/checkout@v4 -# - name: Run tests -# uses: vmactions/openbsd-vm@v1 -# with: -# usesh: true -# prepare: | -# set -e -# pkg_add gcc python3 -# run: | -# set -e -# make install-pip -# python3 -m pip install --user setuptools -# make install -# make test -# make test-memleaks + openbsd: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Run tests + uses: vmactions/openbsd-vm@v1 + with: + usesh: true + prepare: | + set -e + pkg_add gmake + run: | + set -e + gmake install-sysdeps install-pydeps install print-sysinfo test test-memleaks + netbsd: runs-on: ubuntu-latest steps: @@ -60,7 +57,7 @@ jobs: usesh: true prepare: | set -e - pkg_add -v pkgin + /usr/sbin/pkg_add -v pkgin pkgin update run: | set -e diff --git a/Makefile b/Makefile index 320efa3b4..cc4bc04c3 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ else ifeq ($(UNAME_S),FreeBSD) FREEBSD = true else ifeq ($(UNAME_S),NetBSD) NetBSD = true +else ifeq ($(UNAME_S),OpenBSD) + OpenBSD = true endif ifneq (,$(shell command -v sudo 2> /dev/null)) @@ -165,9 +167,11 @@ else ifdef HAS_YUM else ifdef FREEBSD $(SUDO) pkg install -y gmake python3 gcc else ifdef NETBSD - # $(SUDO) pkg_add -v pkgin + # $(SUDO) /usr/sbin/pkg_add -v pkgin # $(SUDO) pkgin update - $(SUDO) pkgin -y install python311-* py311-setuptools-* gcc12-* + $(SUDO) pkgin -y install gmake python311-* py311-setuptools-* gcc12-* +else ifdef OPENBSD + $(SUDO) pkg_add gmake gcc python3 endif install-pydeps: ## Install GIT hooks, pip, test deps (also upgrades them).