diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 657354e8a4..b5bf612cf6 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -2,7 +2,7 @@ name: Ubuntu on: push: - branches: + branches: - '*' pull_request: branches: [ master-dev ] @@ -13,11 +13,26 @@ 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 \ No newline at end of file + run: make + + - name: Copy c header to expected path by impulse test + run: | + mkdir -p architecture/faust/dsp/ + cp compiler/generator/libfaust.h architecture/faust/dsp/ + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + + - name: Run impulse tests (C++ and Rust) + run: cd tests/impulse-tests && make github_action diff --git a/tests/impulse-tests/Make.gcc b/tests/impulse-tests/Make.gcc index 86566920d4..b88ff97950 100644 --- a/tests/impulse-tests/Make.gcc +++ b/tests/impulse-tests/Make.gcc @@ -49,7 +49,7 @@ help: @echo " 'all' (default): generate ir for all the dsp files using the given options" @echo @echo "Options:" - @echo " 'outdir' : define the output directory (default to '$(outdir)')" + @echo " 'outdir' : define the output directory (default to '$(outdir)')" @echo " 'lang' : used for faust -lang option (default to '$(lang)')" @echo " 'arch' : used for faust -a option (default to '$(arch)')" @echo " 'FAUSTOPTIONS' : define additional faust options (default to $(FAUSTOPTIONS))" @@ -172,5 +172,11 @@ ir/c1/double/dlt256/osc_enable.c : dsp/osc_enable.dsp @echo "Can only be tested in scalar mode" $(FAUST) -lang $(lang) -double -os -i -A ../../architecture -a archs/$(arch) $< -o $@ +ir/$(outdir)/prefix.ir: + echo "todo fix bug #1071 to test dsp/prefix.dsp" + +ir/cpp/double/mapp/constant.ir: + echo "todo fix bug #1074 to test dsp/constant.dsp" + ir/$(outdir)/%.$(ext) : dsp/%.dsp $(FAUST) -lang $(lang) $(FAUSTOPTIONS) -i -A ../../architecture -a archs/$(arch) $< -o $@ diff --git a/tests/impulse-tests/Make.interp b/tests/impulse-tests/Make.interp index 39f562c30f..4e6b469994 100644 --- a/tests/impulse-tests/Make.interp +++ b/tests/impulse-tests/Make.interp @@ -37,7 +37,7 @@ help: @echo " 'interp' (default): check the double output using the interp backend" @echo @echo "Options:" - @echo " 'outdir' : define the output directory (default to 'llvm')" + @echo " 'outdir' : define the output directory (default to 'llvm')" @echo " 'FAUSTOPTIONS' : define additional faust options (empty by default)" @echo " 'precision' : define filesCompare expected precision (empty by default)" @@ -62,7 +62,8 @@ impulseinterp: $(SRCDIR)/impulseinterp.cpp $(LIB) ######################################################################### # rules for interp -# Specific rule to test 'control' primitive that currently uses the -lang ocpp backend (still compiling in scalar mode...) +# Specific rule to test 'control' primitive that currently uses the -lang ocpp backend +# (still compiling in scalar mode...) ir/$(outdir)/control.ir: dsp/control.dsp reference/control.ir @echo "Cannot be tested with the Interp backend" diff --git a/tests/impulse-tests/Makefile b/tests/impulse-tests/Makefile index 16af2b4057..2e875ee93d 100644 --- a/tests/impulse-tests/Makefile +++ b/tests/impulse-tests/Makefile @@ -119,6 +119,12 @@ travis: $(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/sch lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I dsp -double -sch" +######################################################################### +# automatic github action test +github_action: + $(MAKE) -f Make.gcc outdir=cpp/double lang=cpp arch=impulsearch.cpp FAUSTOPTIONS="-I ../../libraries/ -I dsp -double" + $(MAKE) -f Make.rust outdir=rust/no CARGOOPTIONS="" FAUSTOPTIONS="-I ../../libraries/ -double -a archs/rust/architecture.rs" + ######################################################################### # c++ and c backends cpp: