Skip to content

Commit

Permalink
enable netbsd CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Oct 1, 2024
1 parent 08ab341 commit c139442
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
with:
usesh: true
prepare: |
set -e
pkg install -y gmake
run: |
set -e -x
set -e
gmake install-sysdeps install-pydeps install print-sysinfo test test-memleaks
# openbsd:
Expand All @@ -49,23 +50,18 @@ jobs:
# make install
# make test
# make test-memleaks
# netbsd:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - name: Run tests
# uses: vmactions/netbsd-vm@v1
# with:
# usesh: true
# prepare: |
# set -e
# /usr/sbin/pkg_add -v pkgin
# pkgin update
# pkgin -y install python311-* py311-setuptools-* gcc12-*
# run: |
# set -e
# make install-pip PYTHON=python3.11
# python3.11 -m pip install --user setuptools
# make install PYTHON=python3.11
# make test PYTHON=python3.11
# make test-memleaks PYTHON=python3.11
netbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
uses: vmactions/netbsd-vm@v1
with:
usesh: true
prepare: |
set -e
pkg_add -v pkgin
pkgin update
run: |
set -e
gmake PYTHON=python3.11 install-sysdeps install-pydeps install print-sysinfo test test-memleaks
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ PYTHON_ENV_VARS = PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1
PYTEST_ARGS = -v -s --tb=short
ARGS =

# Recognize platform
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LINUX = 1
LINUX = true
ifneq (,$(shell command -v apt 2> /dev/null))
HAS_APT = 1
HAS_APT = true
else ifneq (,$(shell command -v yum 2> /dev/null))
HAS_YUM = 1
HAS_YUM = true
endif
else ifeq ($(UNAME_S),FreeBSD)
FREEBSD = 1
FREEBSD = true
else ifeq ($(UNAME_S),NetBSD)
NetBSD = true
endif

ifneq (,$(shell command -v sudo 2> /dev/null))
Expand Down Expand Up @@ -161,6 +164,10 @@ else ifdef HAS_YUM
$(SUDO) yum install -u python3-devel gcc
else ifdef FREEBSD
$(SUDO) pkg install -y gmake python3 gcc
else ifdef NETBSD
# $(SUDO) pkg_add -v pkgin
# $(SUDO) pkgin update
$(SUDO) pkgin -y install python311-* py311-setuptools-* gcc12-*
endif

install-pydeps: ## Install GIT hooks, pip, test deps (also upgrades them).
Expand Down

0 comments on commit c139442

Please sign in to comment.