Skip to content

Commit 544faa5

Browse files
authored
Allow ignoring implementations by default (#113)
1 parent 72d2812 commit 544faa5

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: true
99
default: 3
1010
type: number
11+
ignore:
12+
description: 'Ignore implementations marked as excluded'
13+
required: false
14+
default: true
15+
type: boolean
1116
push:
1217
branches:
1318
- main
@@ -24,7 +29,9 @@ jobs:
2429
- uses: actions/checkout@v4
2530
- name: Set implementations
2631
id: implementations
27-
run: echo implementations=$(ls implementations | tr '\n' ' ' | sed 's/ $//;s/^/{"include":\[{"impl":"/;s/ /"}, {"impl":"/g;s/$/"}]}/') >> $GITHUB_OUTPUT
32+
env:
33+
NO_IGNORE: ${{ (!inputs.ignore || github.event.name == 'schedule') && '1' || '0' }}
34+
run: echo implementations=$(make NO_IGNORE=$NO_IGNORE list | tr '\n' ' ' | sed 's/ $//;s/^/{"include":\[{"impl":"/;s/ /"}, {"impl":"/g;s/$/"}]}/') >> $GITHUB_OUTPUT
2835

2936
benchmark:
3037
needs: set-implementations

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
.DEFAULT_GOAL := all
22
SCHEMAS = $(notdir $(wildcard schemas/*))
3-
IMPLEMENTATIONS ?= $(notdir $(wildcard implementations/*))
3+
ALL_IMPLEMENTATIONS = $(notdir $(wildcard implementations/*))
4+
ifdef NO_IGNORE
5+
IMPLEMENTATIONS ?= $(ALL_IMPLEMENTATIONS)
6+
else
7+
IMPLEMENTATIONS ?= $(filter-out $(patsubst implementations/%/,%,$(dir $(wildcard implementations/*/.benchmark-ignore))), $(ALL_IMPLEMENTATIONS))
8+
endif
49
RUNS := 3
510

611
.PHONY: clean
@@ -41,6 +46,9 @@ define docker_run
4146
done
4247
endef
4348

49+
list:
50+
@echo $(IMPLEMENTATIONS)
51+
4452
# Blaze
4553

4654
implementations/blaze/.dockertimestamp: \

implementations/jsoncons/.benchmark-ignore

Whitespace-only changes.

implementations/schemasafe/.benchmark-ignore

Whitespace-only changes.

0 commit comments

Comments
 (0)