Skip to content

Commit 62c6bb7

Browse files
committed
test.yml: try to use gnu grep on mac
1 parent ccb6cd0 commit 62c6bb7

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ jobs:
4444
uses: gerlero/brew-install@v1
4545
with:
4646
packages: octave
47+
48+
- name: Install Gnu grep
49+
id: install-octave
50+
uses: gerlero/brew-install@v1
51+
with:
52+
packages: grep
4753

4854
- name: Check Out the Repo
4955
uses: actions/checkout@v4
@@ -55,3 +61,9 @@ jobs:
5561

5662
- name: Test oct-hdf5
5763
run: make check
64+
65+
- name: Archive test results
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: code-coverage-report
69+
path: test/fntests.log

src/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ SOURCES := $(wildcard *.cc)
99
OBJS := $(patsubst %.cc,%.oct,$(SOURCES))
1010
SOURCES_UTIL := $(wildcard *.cc)
1111
OBJS_UTIL := $(patsubst %.cc,%.o,$(SOURCES_UTIL))
12-
PKG_ADD := $(shell grep -Pho '(?<=// PKG_ADD: ).*' $(SOURCES))
12+
ifeq ($(UNAME),Darwin)
13+
GREP = ggrep
14+
else
15+
GREP = grep
16+
endif
17+
PKG_ADD := $(shell $(GREP) -Pho '(?<=// PKG_ADD: ).*' $(SOURCES))
1318

1419
## Test Octave version
1520
OCT_MAJ_VER := $(shell ${OCTAVE} -f --silent --eval "printf ('%s', strsplit (version, \".\"){1})")

0 commit comments

Comments
 (0)