forked from cogentcore/webgpu
-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (75 loc) · 1.98 KB
/
ci.yml
File metadata and controls
92 lines (75 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
test-build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: "1"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux
run_examples: true
setup_env: |
sudo apt-get update
sudo apt-get install -f -y libegl1-mesa-dev mesa-vulkan-drivers \
libasound2-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev \
libxkbcommon-dev libwayland-dev
- os: macos-latest
name: Darwin
run_examples: false # macos vm doesn't have software metal api
- os: windows-latest
name: Windows
run_examples: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Setup Environment
run: ${{ matrix.setup_env }}
shell: bash
- name: Run tests
run: |
set -x
cd wgpu
go vet ./...
go test ./...
shell: bash
- name: Run examples
if: ${{ matrix.run_examples }}
run: |
set -x
export WGPU_FORCE_FALLBACK_ADAPTER=1
export WGPU_LOG_LEVEL=TRACE
go run ./examples/adapters
go run ./examples/compute
go run ./examples/capture
go build ./examples/triangle
go build ./examples/boids
go build ./examples/cube
shell: bash
test-build-js:
name: "WASM"
runs-on: ubuntu-latest
env:
GOOS: js
GOARCH: wasm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Build a wasm file
run: |
go build ./examples/triangle