Skip to content

Commit aa0d857

Browse files
committed
Add macOS build job
1 parent 1d9c099 commit aa0d857

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/build.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,27 @@ jobs:
5151
with:
5252
name: bin2video-linux-x86_64
5353
path: bin2video-linux-x86_64.tar.gz
54+
macos:
55+
runs-on: macos-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: Build arm64
59+
run: |
60+
CFLAGS="-arch arm64" make
61+
zip -r bin2video-macos-arm64.zip bin2video
62+
rm bin2video
63+
- name: Archive arm64
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: bin2video-macos-arm64
67+
path: bin2video-macos-arm64.zip
68+
- name: Build x86_64
69+
run: |
70+
CFLAGS="-arch x86_64" make
71+
zip -r bin2video-macos-x86_64.zip bin2video
72+
rm bin2video
73+
- name: Archive x86_64
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: bin2video-macos-x86_64
77+
path: bin2video-macos-x86_64.zip

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ SOURCES := $(wildcard src/*.c)
22
HEADERS := $(wildcard src/*.h)
33

44
bin2video: $(SOURCES) $(HEADERS) Makefile
5-
$(CC) -o $@ -Werror -Wall -Wextra -Wpedantic -O3 $(SOURCES) -lm
5+
$(CC) $(CFLAGS) -o $@ -Werror -Wall -Wextra -Wpedantic -O3 $(SOURCES) -lm

0 commit comments

Comments
 (0)