Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests on OSX in CI #2627

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
cmake: 0
tiles: 1
sound: 1
test-stage: 1
native: osx
grep_clang_version_rxp: "14\\.[0-9]+\\.[0-9]+"
title: Clang 14, macOS 12, Tiles, Localize
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1158,12 +1158,18 @@ else
@echo Cannot run json formatter in cross compiles.
endif

ifeq ($(NATIVE), osx)
NUM_STYLE_JOBS = $$(sysctl -n hw.logicalcpu)
else
NUM_STYLE_JOBS = $$(nproc)
endif

# /data/names work really terribly with the formatter, so we skip them
style-all-json: $(JSON_FORMATTER_BIN)
find data -name "*.json" -print0 | grep -z -v '^data/names/' | xargs -0 -L 1 $(JSON_FORMATTER_BIN)

style-all-json-parallel: $(JSON_FORMATTER_BIN)
find data -name "*.json" -print0 | grep -z -v '^data/names/' | xargs -0 -L 1 -P $$(nproc) $(JSON_FORMATTER_BIN)
find data -name "*.json" -print0 | grep -z -v '^data/names/' | xargs -0 -L 1 -P $(NUM_STYLE_JOBS) $(JSON_FORMATTER_BIN)

$(JSON_FORMATTER_BIN): $(JSON_FORMATTER_SOURCES)
$(CXX) $(CXXFLAGS) $(TOOL_CXXFLAGS) -Itools/format -Isrc \
Expand Down