CI: add macOS testing pipeline (#2)

* CI: add macOS testing pipeline
* glfw: use hidden window

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-07-16 10:57:37 -07:00 committed by GitHub
parent 395fad07a6
commit 0a7e8d341c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -42,3 +42,18 @@ jobs:
run: zig build test run: zig build test
- name: webgpu::test - name: webgpu::test
run: cd webgpu && zig build test run: cd webgpu && zig build test
mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Zig
run: |
brew install xz
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.9.0-dev.453+7ef854682.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: mach::test
run: zig build test
env:
AGREE: true
- name: webgpu::test
run: cd webgpu && zig build test

View file

@ -7,6 +7,7 @@ pub fn basicTest() void {
if (c.glfwInit() != c.GLFW_TRUE) { if (c.glfwInit() != c.GLFW_TRUE) {
@panic("failed to init"); @panic("failed to init");
} }
c.glfwWindowHint(c.GLFW_VISIBLE, c.GLFW_FALSE);
const window = c.glfwCreateWindow(640, 480, "GLFW example", null, null); const window = c.glfwCreateWindow(640, 480, "GLFW example", null, null);
if (window == null) { if (window == null) {
c.glfwTerminate(); c.glfwTerminate();