Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Géry Casiez
committed
Aug 15, 2023
1 parent
bab1326
commit b239093
Showing
11 changed files
with
103 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Test cpp | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: gcc:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: make | ||
run: cd cpp ; make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CC=gcc | ||
CFLAGS=-I. | ||
PYTHON=python3 | ||
|
||
all: testc | ||
|
||
SF1eFilter.o: | ||
$(CC) -c -o SF1eFilter.o SF1eFilter.c $(CFLAGS) | ||
|
||
c: SF1eFilter.o | ||
$(CC) -o 1eurofilter SF1eFilter.o test.c ; \ | ||
./1eurofilter > test.csv | ||
|
||
testc: c | ||
$(PYTHON) ../test.py Cversion test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CPP=g++ | ||
PYTHON=python3 | ||
|
||
all: testcplusplusUsingTemplates | ||
|
||
cplusplusUsingTemplates: | ||
$(CPP) -o 1efilter 1efilter.cc ; \ | ||
./1efilter > test.csv | ||
|
||
testcplusplusUsingTemplates: cplusplusUsingTemplates | ||
$(PYTHON) ../test.py cppUsingTemplates test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,29 @@ | ||
CPP=g++ | ||
CC=gcc | ||
CFLAGS=-I. | ||
PYTHON=python3 | ||
|
||
all: testcplusplus testcplusplusUsingTemplates testc testpython testJava testJavascript testTypescript | ||
|
||
# C++ version original | ||
OneEuroFilter.o: | ||
cd cpp ; \ | ||
$(CPP) -c -o OneEuroFilter.o OneEuroFilter.cpp | ||
|
||
cplusplus: OneEuroFilter.o | ||
cd cpp ; \ | ||
$(CPP) -o OneEuroFilterCpp OneEuroFilter.o Test.cpp ; \ | ||
./OneEuroFilterCpp > test.csv | ||
|
||
testcplusplus: cplusplus | ||
$(PYTHON) test.py cpp cpp/test.csv | ||
testcplusplus: | ||
cd cpp ; make | ||
|
||
# C++ version using templates | ||
cplusplusUsingTemplates: | ||
cd CppUsingTemplates ; \ | ||
$(CPP) -o 1efilter 1efilter.cc ; \ | ||
./1efilter > test.csv | ||
|
||
testcplusplusUsingTemplates: cplusplusUsingTemplates | ||
$(PYTHON) test.py cppUsingTemplates CppUsingTemplates/test.csv | ||
testcplusplusUsingTemplates: | ||
cd CppUsingTemplates ; make | ||
|
||
# C version | ||
SF1eFilter.o: | ||
cd C ; \ | ||
$(CC) -c -o SF1eFilter.o SF1eFilter.c $(CFLAGS) | ||
|
||
c: SF1eFilter.o | ||
cd C ; \ | ||
$(CC) -o 1eurofilter SF1eFilter.o test.c ; \ | ||
./1eurofilter > test.csv | ||
|
||
testc: c | ||
$(PYTHON) test.py Cversion C/test.csv | ||
testc: | ||
cd C ; make | ||
|
||
# Python version | ||
testpython: | ||
cd python ; \ | ||
$(PYTHON) OneEuroFilterTest.py > test.csv ; \ | ||
cd .. ; \ | ||
$(PYTHON) test.py python python/test.csv | ||
cd python ; make | ||
|
||
# Java | ||
javaVersion: | ||
cd java ; \ | ||
javac Test.java ; \ | ||
java Test > test.csv ; \ | ||
|
||
testJava: javaVersion | ||
$(PYTHON) test.py java java/test.csv | ||
testJava: | ||
cd java ; make | ||
|
||
# Javascript | ||
javascriptVersion: | ||
cd javascript ; \ | ||
node test.js > test.csv | ||
|
||
testJavascript: javascriptVersion | ||
$(PYTHON) test.py javascript javascript/test.csv | ||
testJavascript: | ||
cd javascript ; make | ||
|
||
# Typescript | ||
|
||
typeScriptVersion: | ||
cd typescript ; \ | ||
npm install ; \ | ||
tsc ; \ | ||
node dist/test.js > test.csv | ||
|
||
testTypescript: typeScriptVersion | ||
$(PYTHON) test.py typescript typescript/test.csv | ||
testTypescript: | ||
cd typescript ; make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CPP=g++ | ||
PYTHON=python3 | ||
|
||
all: testcplusplus | ||
|
||
OneEuroFilter.o: | ||
$(CPP) -c -o OneEuroFilter.o OneEuroFilter.cpp | ||
|
||
cplusplus: OneEuroFilter.o | ||
$(CPP) -o OneEuroFilterCpp OneEuroFilter.o Test.cpp ; \ | ||
./OneEuroFilterCpp > test.csv | ||
|
||
testcplusplus: cplusplus | ||
$(PYTHON) ../test.py cpp test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PYTHON=python3 | ||
|
||
all: testJava | ||
|
||
javaVersion: | ||
javac Test.java ; \ | ||
java Test > test.csv ; \ | ||
|
||
testJava: javaVersion | ||
$(PYTHON) ../test.py java test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PYTHON=python3 | ||
|
||
all: testJavascript | ||
|
||
javascriptVersion: | ||
node test.js > test.csv | ||
|
||
testJavascript: javascriptVersion | ||
$(PYTHON) ../test.py javascript test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PYTHON=python3 | ||
|
||
all: | ||
$(PYTHON) OneEuroFilterTest.py > test.csv ; \ | ||
$(PYTHON) ../test.py python test.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PYTHON=python3 | ||
|
||
all: | ||
npm install ; \ | ||
tsc ; \ | ||
node dist/test.js > test.csv |