Skip to content

Commit 20eaa00

Browse files
committed
CI: build Processing.o and PCH for macOS
1 parent 5ea1e16 commit 20eaa00

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/build-cache.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ jobs:
101101
BREW=$(brew --prefix)
102102
FLAGS="-std=c++2c -O2 -w -DPROCESSING_HAS_STB_IMAGE -DPROCESSING_HAS_STB_TRUETYPE -I src -I $BREW/include"
103103
104-
# Processing.o skipped on macOS -- clang namespace issue;
105-
# it compiles inline at sketch build time instead.
106104
105+
echo "Building Processing.o..."
106+
g++ $FLAGS -Wno-error -c src/Processing.cpp -o cache/macos-arm64/Processing.o || echo "WARNING: Processing.o failed"
107107
echo "Building Processing_defaults.o..."
108-
g++ $FLAGS -Wno-error -c src/Processing_defaults.cpp -o cache/macos-arm64/Processing_defaults.o || echo "WARNING: defaults.o build failed, skipping"
108+
g++ $FLAGS -Wno-error -c src/Processing_defaults.cpp -o cache/macos-arm64/Processing_defaults.o || echo "WARNING: defaults.o failed"
109+
echo "Building PCH..."
110+
g++ $FLAGS -x c++-header src/Processing.h -o cache/macos-arm64/Processing.h.gch || echo "WARNING: PCH failed"
109111
110112
ls -lh cache/macos-arm64/
111113
@@ -130,11 +132,13 @@ jobs:
130132
BREW=$(brew --prefix)
131133
FLAGS="-std=c++2c -O2 -w -target x86_64-apple-macos10.13 -DPROCESSING_HAS_STB_IMAGE -DPROCESSING_HAS_STB_TRUETYPE -I src -I $BREW/include"
132134
133-
# Processing.o skipped on macOS -- clang namespace issue;
134-
# it compiles inline at sketch build time instead.
135135
136+
echo "Building Processing.o..."
137+
g++ $FLAGS -Wno-error -c src/Processing.cpp -o cache/macos-x64/Processing.o || echo "WARNING: Processing.o failed"
136138
echo "Building Processing_defaults.o..."
137-
g++ $FLAGS -Wno-error -c src/Processing_defaults.cpp -o cache/macos-x64/Processing_defaults.o || echo "WARNING: defaults.o build failed, skipping"
139+
g++ $FLAGS -Wno-error -c src/Processing_defaults.cpp -o cache/macos-x64/Processing_defaults.o || echo "WARNING: defaults.o failed"
140+
echo "Building PCH..."
141+
g++ $FLAGS -x c++-header src/Processing.h -o cache/macos-x64/Processing.h.gch || echo "WARNING: PCH failed"
138142
139143
ls -lh cache/macos-x64/
140144

0 commit comments

Comments
 (0)