-
Notifications
You must be signed in to change notification settings - Fork 22
92 lines (76 loc) · 2.87 KB
/
ci.yml
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
on:
push:
branches:
- main
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'
name: Continuous Integration
jobs:
build:
name: Build [${{ matrix.renderer }} | ${{ matrix.config.name }}]
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
renderer:
- OpenGL
- WGPU
config:
- { name: Linux (x86), os: ubuntu-latest, target: "x86_64-unknown-linux-gnu" }
- { name: Linux (ARM), os: ubuntu-latest, target: "aarch64-unknown-linux-gnu" }
- { name: MacOS (x86), os: macos-latest, target: "x86_64-apple-darwin" }
- { name: MacOS (ARM), os: macos-latest, target: "aarch64-apple-darwin" }
- { name: Windows (x86), os: windows-latest, target: "x86_64-pc-windows-msvc" }
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.config.target }}
- name: Setup aarch64
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu
echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config
echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config
- name: Build Inox2D
run: cargo build -p inox2d --no-default-features --features owo --all-targets --target=${{ matrix.config.target }}
- name: Build Inox2D (OpenGL)
if: matrix.renderer == 'OpenGL'
run: cargo build -p inox2d-opengl --all-targets --target=${{ matrix.config.target }}
- name: Build Example (OpenGL)
if: matrix.renderer == 'OpenGL'
run: cargo build -p render-opengl --all-targets --target=${{ matrix.config.target }}
- name: Build Inox2D (WGPU)
if: matrix.renderer == 'WGPU'
run: cargo build -p inox2d-wgpu --all-targets --target=${{ matrix.config.target }}
- name: Build Example (WGPU)
if: matrix.renderer == 'WGPU'
run: cargo build -p render-wgpu --all-targets --target=${{ matrix.config.target }}
build-webgl:
name: Build WebGL Example
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Build Inox2D
run: cargo build -p inox2d --no-default-features --features owo --all-targets --target=wasm32-unknown-unknown
- name: Build Inox2D (OpenGL)
if: matrix.renderer == 'OpenGL'
run: cargo build -p inox2d-opengl --all-targets --target=wasm32-unknown-unknown
- name: Build WebGL Example
run: cargo build -p render-webgl --target=wasm32-unknown-unknown