Skip to content

Commit 720090f

Browse files
vecmath 1.0
1 parent ed697f8 commit 720090f

File tree

2 files changed

+20745
-0
lines changed

2 files changed

+20745
-0
lines changed

.github/workflows/main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
cl /Tc assetsys.h /DASSETSYS_IMPLEMENTATION /DASSETSYS_RUN_TESTS /DSTRPOOL_IMPLEMENTATION /MTd
2020
- name: run assetsys tests
2121
run: .\assetsys.exe
22+
- name: build vecmath.h
23+
run: |
24+
cl /nologo /Fevecmath_msvc.exe /std:c11 /Wall /wd5045 /MTd -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS /Tc vecmath.h
25+
- name: run vecmath tests
26+
run: .\vecmath_msvc.exe
2227
build-windows-msvc-cpp:
2328
runs-on: windows-latest
2429
steps:
@@ -35,6 +40,11 @@ jobs:
3540
cl /Tp assetsys.h /DASSETSYS_IMPLEMENTATION /DASSETSYS_RUN_TESTS /DSTRPOOL_IMPLEMENTATION /MTd
3641
- name: run assetsys tests
3742
run: .\assetsys.exe
43+
- name: build vecmath.h
44+
run: |
45+
cl /nologo /Fevecmath_msvcpp.exe /std:c11 /Wall /wd5045 /wd4514 /MTd -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS /Tp vecmath.h
46+
- name: run vecmath tests
47+
run: .\vecmath_msvcpp.exe
3848
build-windows-tcc:
3949
runs-on: windows-latest
4050
steps:
@@ -56,6 +66,11 @@ jobs:
5666
tcc\tcc -xc assetsys.h -DASSETSYS_IMPLEMENTATION -DASSETSYS_RUN_TESTS -DSTRPOOL_IMPLEMENTATION
5767
- name: run assetsys tests
5868
run: .\assetsys.exe
69+
- name: build vecmath.h
70+
run: |
71+
tcc\tcc -Wall -o vecmath_tcc.exe -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -xc vecmath.h
72+
- name: run vecmath tests
73+
run: .\vecmath_tcc.exe
5974
build-macos:
6075
runs-on: macOS-latest
6176
steps:
@@ -70,6 +85,11 @@ jobs:
7085
clang -xc assetsys.h -DASSETSYS_IMPLEMENTATION -DASSETSYS_RUN_TESTS -DSTRPOOL_IMPLEMENTATION
7186
- name: run assetsys tests
7287
run: ./a.out
88+
- name: build vecmath.h
89+
run: |
90+
clang -Wall -pedantic -Wno-invalid-utf8 -Wno-gnu-zero-variadic-macro-arguments -o vecmath_clang -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -DVECMATH_EXT_VECTOR_TYPE -xc vecmath.h
91+
- name: run vecmath tests
92+
run: ./vecmath_clang
7393
build-macos-cpp:
7494
runs-on: macOS-latest
7595
steps:
@@ -84,6 +104,11 @@ jobs:
84104
clang -xc++ assetsys.h -DASSETSYS_IMPLEMENTATION -DASSETSYS_RUN_TESTS -DSTRPOOL_IMPLEMENTATION
85105
- name: run assetsys tests
86106
run: ./a.out
107+
- name: build vecmath.h
108+
run: |
109+
clang++ -Wall -pedantic -Wno-invalid-utf8 -Wno-gnu-zero-variadic-macro-arguments -Wno-extra-semi -o vecmath_clangcpp -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -xc++ vecmath.h -Wno-everything -Wno-deprecated-declarations
110+
- name: run vecmath tests
111+
run: ./vecmath_clangcpp
87112
build-linux-gcc:
88113
runs-on: ubuntu-latest
89114
steps:
@@ -98,6 +123,11 @@ jobs:
98123
gcc -xc assetsys.h -DASSETSYS_IMPLEMENTATION -DASSETSYS_RUN_TESTS -DSTRPOOL_IMPLEMENTATION
99124
- name: run assetsys tests
100125
run: ./a.out
126+
- name: build vecmath.h
127+
run: |
128+
gcc -Wall -pedantic -Wno-invalid-utf8 -Wno-gnu-zero-variadic-macro-arguments -o vecmath_gcc -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -xc vecmath.h -lm
129+
- name: run vecmath tests
130+
run: ./vecmath_gcc
101131
build-linux-gcc-cpp:
102132
runs-on: ubuntu-latest
103133
steps:
@@ -112,3 +142,26 @@ jobs:
112142
gcc -xc++ assetsys.h -DASSETSYS_IMPLEMENTATION -DASSETSYS_RUN_TESTS -DSTRPOOL_IMPLEMENTATION
113143
- name: run assetsys tests
114144
run: ./a.out
145+
- name: build vecmath.h
146+
run: |
147+
gcc -Wall -pedantic -Wno-invalid-utf8 -Wno-gnu-zero-variadic-macro-arguments -Wno-extra-semi -o vecmath_gcccpp -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -xc++ vecmath.h -lm
148+
- name: run vecmath tests
149+
run: ./vecmath_gcccpp
150+
build-wasm:
151+
runs-on: windows-latest
152+
steps:
153+
- uses: actions/checkout@v1
154+
- uses: robinraju/release-downloader@v1
155+
with:
156+
repository: "mattiasgustavsson/template_project"
157+
tag: "wasm-build-tools"
158+
fileName: "wasm-build-tools-win.zip"
159+
- name: install dependencies
160+
run: 7z x wasm-build-tools-win.zip
161+
- name: build vecmath.h
162+
run: |
163+
'#include "vecmath.h"' | Out-File -Encoding ascii vecmath.c
164+
wasm\node wasm\wajicup.js -cc "-Wall -pedantic -Wno-gnu-zero-variadic-macro-arguments -DVECMATH_RUN_TESTS -DVECMATH_USE_EXTERNAL_TESTFW -DVECMATH_GENERICS -DVECMATH_EXT_VECTOR_TYPE" vecmath.c vecmath.js
165+
(Get-Content vecmath.js -Raw) -replace ',\s*(\w+\.__main_argc_argv\(1,\w+\))\s*,', ',process.exit($1),' | Set-Content vecmath.js
166+
- name: run vecmath tests
167+
run: wasm\node vecmath.js

0 commit comments

Comments
 (0)