Skip to content

Commit

Permalink
add cpp and rust tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
crop2000 committed Oct 26, 2024
1 parent 5f1cf9e commit 76d4678
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 29 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Ubuntu

on:
push:
branches:
branches:
- '*'
pull_request:
branches: [ master-dev ]
Expand All @@ -13,11 +13,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install libmicrohttpd
run: |
sudo apt-get update -qq
sudo apt-get update -qq
sudo apt-get install libmicrohttpd-dev
- name: Build Faust
run: make
run: make

- name: Copy c header to expected path by impulse test
run: |
mkdir -p faust/dsp/
cp compiler/generator/libfaust.h faust/dsp/
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Run impulse tests (C++)
run: cd tests/impulse-tests && make cpp

- name: Run impulse tests (Rust)
run: cd tests/impulse-tests && make rust
2 changes: 1 addition & 1 deletion tests/impulse-tests/Make.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
endif
MAKE ?= make

GCCOPTIONS := -O3 -I../../architecture -I/usr/local/include/ap_fixed -Iarchs -pthread -std=c++11
GCCOPTIONS := -O3 -I../../ -I../../architecture -I/usr/local/include/ap_fixed -Iarchs -pthread -std=c++11
outdir ?= cpp/double
lang ?= cpp
ext ?= cpp
Expand Down
50 changes: 25 additions & 25 deletions tests/impulse-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,31 @@ travis:
#########################################################################
# c++ and c backends
cpp:
$(MAKE) -f Make.gcc outdir=cpp/double lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double"
$(MAKE) -f Make.gcc outdir=cpp/double/uim lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -uim"
$(MAKE) -f Make.gcc outdir=cpp/double/it lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -it"
$(MAKE) -f Make.gcc outdir=cpp/double/fp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -fp"
$(MAKE) -f Make.gcc outdir=cpp/double/wall lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -wall"
$(MAKE) -f Make.gcc outdir=cpp/double/mcd0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -mcd 0"
$(MAKE) -f Make.gcc outdir=cpp/double/mapp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -mapp"
$(MAKE) -f Make.gcc outdir=cpp/double/rui lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -rui"
$(MAKE) -f Make.gcc outdir=cpp/double/nvi lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -nvi"
$(MAKE) -f Make.gcc outdir=cpp/double/dlt0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -dlt 0"
$(MAKE) -f Make.gcc outdir=cpp/double/dlt256 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -dlt 256"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 0"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 0 -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0/vs16 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 0 -vs 16"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 1"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 1 -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1/vs16 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -vec -lv 1 -vs 16"
$(MAKE) -f Make.gcc outdir=cpp/double/sched lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -sch"
$(MAKE) -f Make.gcc outdir=cpp/double/sched/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -sch -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/omp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -omp"
$(MAKE) -f Make.gcc outdir=cpp/double/omp/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -omp -fun"
$(MAKE) -f Make.gcc outdir=cpp/float lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -single"
$(MAKE) -f Make.gcc outdir=cpp/float/vec lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -single -vec"
$(MAKE) -f Make.gcc outdir=cpp/float/sched lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -single -sch"
$(MAKE) -f Make.gcc outdir=cpp/float/omp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -single -omp"
$(MAKE) -f Make.gcc outdir=cpp/double lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double"
$(MAKE) -f Make.gcc outdir=cpp/double/uim lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -uim"
$(MAKE) -f Make.gcc outdir=cpp/double/it lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -it"
$(MAKE) -f Make.gcc outdir=cpp/double/fp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -fp"
$(MAKE) -f Make.gcc outdir=cpp/double/wall lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -wall"
$(MAKE) -f Make.gcc outdir=cpp/double/mcd0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -mcd 0"
$(MAKE) -f Make.gcc outdir=cpp/double/mapp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -mapp"
$(MAKE) -f Make.gcc outdir=cpp/double/rui lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -rui"
$(MAKE) -f Make.gcc outdir=cpp/double/nvi lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -nvi"
$(MAKE) -f Make.gcc outdir=cpp/double/dlt0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -dlt 0"
$(MAKE) -f Make.gcc outdir=cpp/double/dlt256 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -dlt 256"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 0"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 0 -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv0/vs16 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 0 -vs 16"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 1"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 1 -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/vec/lv1/vs16 lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -vec -lv 1 -vs 16"
$(MAKE) -f Make.gcc outdir=cpp/double/sched lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -sch"
$(MAKE) -f Make.gcc outdir=cpp/double/sched/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -sch -fun"
$(MAKE) -f Make.gcc outdir=cpp/double/omp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -omp"
$(MAKE) -f Make.gcc outdir=cpp/double/omp/fun lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double -omp -fun"
$(MAKE) -f Make.gcc outdir=cpp/float lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -single"
$(MAKE) -f Make.gcc outdir=cpp/float/vec lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -single -vec"
$(MAKE) -f Make.gcc outdir=cpp/float/sched lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -single -sch"
$(MAKE) -f Make.gcc outdir=cpp/float/omp lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -single -omp"

quad:
$(MAKE) -f Make.gcc outdir=cpp/quad lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -quad"
Expand Down

0 comments on commit 76d4678

Please sign in to comment.