-
Notifications
You must be signed in to change notification settings - Fork 8
111 lines (111 loc) · 4.97 KB
/
actions.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: actions
on: [push, pull_request]
jobs:
build-codegen:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile Code Generator
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path codegen/Cargo.toml
- uses: actions/upload-artifact@v2
with:
name: codegen-linux-bin
path: codegen/target/debug/codegen
run-codegen:
needs: build-codegen
runs-on: ubuntu-latest
strategy:
matrix:
algebra:
- name: epga1d
descriptor: "epga1d:1,1;Scalar:1;ComplexNumber:1,e01"
- name: ppga1d
descriptor: "ppga1d:0,1;Scalar:1;DualNumber:1,e01"
- name: hpga1d
descriptor: "hpga1d:-1,1;Scalar:1;SplitComplexNumber:1,e01"
- name: epga2d
descriptor: "epga2d:1,1,1;Scalar:1;MultiVector:1,e12,e1,e2|e0,e012,e01,-e02;Rotor:1,e12;Point:e12,e01,-e02;IdealPoint:e01,-e02;Plane:e0,e2,e1;Translator:1,e01,-e02;Motor:1,e12,e01,-e02;MotorDual:e012,e0,e2,e1"
- name: ppga2d
descriptor: "ppga2d:0,1,1;Scalar:1;MultiVector:1,e12,e1,e2|e0,e012,e01,-e02;Rotor:1,e12;Point:e12,e01,-e02;IdealPoint:e01,-e02;Plane:e0,e2,e1;Translator:1,e01,-e02;Motor:1,e12,e01,-e02;MotorDual:e012,e0,e2,e1"
- name: hpga2d
descriptor: "hpga2d:-1,1,1;Scalar:1;MultiVector:1,e12,e1,e2|e0,e012,e01,-e02;Rotor:1,e12;Point:e12,e01,-e02;IdealPoint:e01,-e02;Plane:e0,e2,e1;Translator:1,e01,-e02;Motor:1,e12,e01,-e02;MotorDual:e012,e0,e2,e1"
- name: epga3d
descriptor: "epga3d:1,1,1,1;Scalar:1;MultiVector:1,e23,-e13,e12|e0,-e023,e013,-e012|e123,e1,e2,e3|e0123,e01,e02,e03;Rotor:1,e23,-e13,e12;Point:e123,-e023,e013,-e012;IdealPoint:e01,e02,e03;Plane:e0,e1,e2,e3;Line:e01,e02,e03|e23,-e13,e12;Translator:1,e01,e02,e03;Motor:1,e23,-e13,e12|e0123,e01,e02,e03;PointAndPlane:e123,-e023,e013,-e012|e0,e1,e2,e3"
- name: ppga3d
descriptor: "ppga3d:0,1,1,1;Scalar:1;MultiVector:1,e23,-e13,e12|e0,-e023,e013,-e012|e123,e1,e2,e3|e0123,e01,e02,e03;Rotor:1,e23,-e13,e12;Point:e123,-e023,e013,-e012;IdealPoint:e01,e02,e03;Plane:e0,e1,e2,e3;Line:e01,e02,e03|e23,-e13,e12;Translator:1,e01,e02,e03;Motor:1,e23,-e13,e12|e0123,e01,e02,e03;PointAndPlane:e123,-e023,e013,-e012|e0,e1,e2,e3"
- name: hpga3d
descriptor: "hpga3d:-1,1,1,1;Scalar:1;MultiVector:1,e23,-e13,e12|e0,-e023,e013,-e012|e123,e1,e2,e3|e0123,e01,e02,e03;Rotor:1,e23,-e13,e12;Point:e123,-e023,e013,-e012;IdealPoint:e01,e02,e03;Plane:e0,e1,e2,e3;Line:e01,e02,e03|e23,-e13,e12;Translator:1,e01,e02,e03;Motor:1,e23,-e13,e12|e0123,e01,e02,e03;PointAndPlane:e123,-e023,e013,-e012|e0,e1,e2,e3"
steps:
- uses: actions/download-artifact@v2
with:
name: codegen-linux-bin
path: codegen
- run: chmod +x codegen/codegen
- run: mkdir src
- name: Generate Source Code
working-directory: codegen
run: ./codegen "${{ matrix.algebra.descriptor }}"
- uses: actions/upload-artifact@v2
with:
name: lib-src
path: src/${{ matrix.algebra.name }}.*
test-rust:
needs: run-codegen
runs-on: ubuntu-latest
strategy:
matrix:
target:
- triple: i686-unknown-linux-gnu
toolchain: stable
- triple: x86_64-unknown-linux-gnu
toolchain: stable
# - triple: arm-unknown-linux-gnueabihf
# toolchain: nightly
# rustflags: -C target-feature=+neon
- triple: aarch64-unknown-linux-gnu
toolchain: nightly
- triple: wasm32-unknown-unknown
toolchain: nightly
rustflags: --cfg=web_sys_unstable_apis -C target-feature=+simd128
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: lib-src
path: src
- name: Install Dependencies
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target.triple }}
toolchain: ${{ matrix.target.toolchain }}
override: true
- name: Cross Compile Rust
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: ${{ matrix.target.rustflags }}
with:
command: build
args: --target ${{ matrix.target.triple }}
test-glsl:
needs: run-codegen
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: lib-src
path: src
- name: Install Dependencies
run: |
curl -GO https://storage.googleapis.com/shaderc/artifacts/prod/graphics_shader_compiler/shaderc/linux/continuous_clang_release/357/20210315-190728/install.tgz
tar -xzf install.tgz install/bin/glslc
- name: Validate GLSL
run: |
printf "#version 460\nvoid main() {}\n" > frame.glsl
find src/*.glsl | while read line;
do cat frame.glsl $line | install/bin/glslc -fshader-stage=comp -
done