Skip to content

Commit 1bcd6aa

Browse files
Merge pull request #288 from lightpanda-io/macos-x86_64
build: accept macos x86_64
2 parents 7e1e995 + 9f6c358 commit 1bcd6aa

File tree

3 files changed

+75
-5
lines changed

3 files changed

+75
-5
lines changed

.github/actions/install/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ runs:
5151
5252
wget -O ${{ inputs.cache-dir }}/v8/libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${{ inputs.zig-v8 }}/libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a
5353
54-
- run: sudo apt-get install -yq libglib2.0-dev
54+
- name: Install apt deps
55+
if: ${{ inputs.os == 'linux' }}
56+
run: sudo apt-get install -yq libglib2.0-dev
5557
shell: bash
5658

5759
- name: install v8

.github/workflows/zig-test.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,75 @@ jobs:
8787

8888
- name: zig build test
8989
run: zig build test -Dengine=v8
90+
91+
zig-test-macos-x86_64:
92+
env:
93+
ARCH: x86_64
94+
OS: macos
95+
96+
# Don't run the CI with draft PR.
97+
if: github.event.pull_request.draft == false
98+
99+
runs-on: macos-13
100+
101+
steps:
102+
- uses: actions/checkout@v4
103+
with:
104+
fetch-depth: 0
105+
submodules: true
106+
107+
- uses: ./.github/actions/install
108+
with:
109+
os: ${{env.OS}}
110+
arch: ${{env.ARCH}}
111+
112+
- name: zig build test
113+
run: zig build test -Dengine=v8
114+
115+
zig-test-macos-aarch64:
116+
env:
117+
ARCH: aarch64
118+
OS: macos
119+
120+
# Don't run the CI with draft PR.
121+
if: github.event.pull_request.draft == false
122+
123+
runs-on: macos-latest
124+
125+
steps:
126+
- uses: actions/checkout@v4
127+
with:
128+
fetch-depth: 0
129+
submodules: true
130+
131+
- uses: ./.github/actions/install
132+
with:
133+
os: ${{env.OS}}
134+
arch: ${{env.ARCH}}
135+
136+
- name: zig build test
137+
run: zig build test -Dengine=v8
138+
139+
zig-test-linux-aarch64:
140+
env:
141+
ARCH: aarch64
142+
OS: linux
143+
144+
# Don't run the CI with draft PR.
145+
if: github.event.pull_request.draft == false
146+
147+
runs-on: ubuntu-24.04-arm
148+
149+
steps:
150+
- uses: actions/checkout@v4
151+
with:
152+
fetch-depth: 0
153+
submodules: true
154+
155+
- uses: ./.github/actions/install
156+
with:
157+
os: ${{env.OS}}
158+
arch: ${{env.ARCH}}
159+
160+
- name: zig build test
161+
run: zig build test -Dengine=v8

build.zig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ pub fn packages(comptime vendor_path: []const u8) type {
198198
break :blk;
199199
},
200200
.macos => blk: {
201-
if (arch != .aarch64) {
202-
std.debug.print("only aarch64 are supported on macos builds\n", .{});
203-
return error.ArchNotSupported;
204-
}
205201
break :blk;
206202
},
207203
else => return error.OsNotSupported,

0 commit comments

Comments
 (0)