diff --git a/.github/workflows/build_test_firmware.yml b/.github/workflows/build_test_firmware.yml index 71ceaee5d..264f0e28b 100644 --- a/.github/workflows/build_test_firmware.yml +++ b/.github/workflows/build_test_firmware.yml @@ -60,6 +60,7 @@ jobs: echo "AudibleInstruments:Braids" >> firmware/lim cd firmware && make limit lim && make all + # Don't upload artifacts for each build, uses too much space on our account # - name: Upload artifact # uses: actions/upload-artifact@v3 # with: @@ -74,6 +75,5 @@ jobs: with: name: "Firmware Version: ${{ env.CI_REF_NAME }}" files: | - firmware/build/mp1corea7/medium/main.elf firmware/build/mp1corea7/medium/main.uimg diff --git a/.github/workflows/run_vcv_tests.yml b/.github/workflows/run_vcv_tests.yml index b2dfd95fc..14aa70b5f 100644 --- a/.github/workflows/run_vcv_tests.yml +++ b/.github/workflows/run_vcv_tests.yml @@ -2,6 +2,27 @@ name: Run VCV unit tests on: workflow_dispatch: + inputs: + linux_x64: + description: 'Run tests on Linux x64' + required: true + default: true + type: boolean + win_x64: + description: 'Run tests on Windows x64' + required: true + default: false + type: boolean + # mac_x64: + # description: 'Run tests on Mac x64' + # required: true + # default: false + # type: boolean + # mac_arm64: + # description: 'Run tests on Mac arm64' + # required: true + # default: false + # type: boolean push: branches: - main @@ -14,21 +35,49 @@ on: - '!shared/tableGen' # Skip generator script (still run CI if generated files change) env: - rack-sdk-version: 2.3.0 - + rack-sdk-version: latest + jobs: - build: - + build-tests-lin-x64: + if: ${{ github.event_name == 'push' || inputs.linux_x64 }} + name: lin-x64 + runs-on: ubuntu-latest strategy: fail-fast: false - matrix: - os: - # - { os: windows, shell: msys2, rack-os-name: win-x64 } # runs out of memory - "cc1plus.exe: out of memory allocating 65536 bytes" - - { os: ubuntu, shell: bash, rack-os-name: lin-x64 } - runs-on: '${{ matrix.os.os }}-latest' defaults: run: - shell: '${{ matrix.os.shell }} {0}' + shell: bash + env: + CC: gcc + CXX: g++ + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + token: ${{ secrets.CHECKOUT_TOKEN }} + + - name: Get Rack-SDK + run: | + wget https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-lin-x64.zip + unzip Rack-SDK-${{ env.rack-sdk-version }}-lin-x64.zip + + - name: Build and run tests + run: | + export RACK_DIR=$HOME/Rack-SDK + cd vcv + make -f tests/Makefile + + build-tests-win-x64: + if: ${{ inputs.win_x64 }} #Only run msys2 test manually + name: win-x64 + runs-on: windows-latest + strategy: + fail-fast: false + defaults: + run: + shell: 'msys2 {0}' env: CC: gcc CXX: g++ @@ -41,7 +90,6 @@ jobs: token: ${{ secrets.CHECKOUT_TOKEN }} - name: Install windows dependencies (MSYS2) - if: matrix.os.os =='windows' uses: msys2/setup-msys2@v2 with: msystem: mingw64 @@ -50,12 +98,13 @@ jobs: - name: Get Rack-SDK run: | - pushd $HOME - curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-${{ matrix.os.rack-os-name }}.zip - unzip Rack-SDK.zip + wget https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-win-x64.zip + unzip Rack-SDK-${{ env.rack-sdk-version }}-win-x64.zip - name: Build and run tests run: | export RACK_DIR=$HOME/Rack-SDK cd vcv make -f tests/Makefile + + diff --git a/vcv/Makefile b/vcv/Makefile index ecb9d8431..e3697ce54 100644 --- a/vcv/Makefile +++ b/vcv/Makefile @@ -65,7 +65,7 @@ ifeq ($(UNAME_S),Darwin) CXXFLAGS += -mmacosx-version-min=10.15 endif -./build/src/shared/CoreModules/enosc/dynamic_data.cc.o: CXXFLAGS+=-Wno-unknown-pragmas +dynamic_data.cc.o: CXXFLAGS+=-Wno-unknown-pragmas all: plugin res diff --git a/vcv/tests/Makefile b/vcv/tests/Makefile index 156b905bb..7567a478c 100644 --- a/vcv/tests/Makefile +++ b/vcv/tests/Makefile @@ -4,7 +4,7 @@ TEST_DIR ?= tests DOCTESTHEADER_DIR ?= $(TEST_DIR) BUILDDIR = $(TEST_DIR)/build/obj -RYMLDIR = src/shared/patch_convert/ryml/rapidyaml +RYMLDIR = ../shared/patch_convert/ryml/rapidyaml JANSSON_CONF_DIR = ../firmware/lib/jansson JANSSON_DIR = ../firmware/lib/jansson/jansson/src @@ -15,8 +15,8 @@ TEST_SOURCES += $(wildcard $(TEST_DIR)/*_tests.cc) TEST_SOURCES += $(wildcard $(TEST_DIR)/*_tests.cpp) TEST_SOURCES += $(wildcard $(TEST_DIR)/test_*.cc) TEST_SOURCES += $(wildcard $(TEST_DIR)/test_*.cpp) -TEST_SOURCES += src/shared/patch_convert/patch_to_yaml.cc -TEST_SOURCES += src/shared/patch_convert/ryml/ryml_serial.cc +TEST_SOURCES += ../shared/patch_convert/patch_to_yaml.cc +TEST_SOURCES += ../shared/patch_convert/ryml/ryml_serial.cc TEST_SOURCES += src/mapping/patch_writer.cc TEST_SOURCES += $(wildcard $(RYMLDIR)/src/c4/yml/*.cpp) TEST_SOURCES += $(wildcard $(RYMLDIR)/ext/c4core/src/c4/*.cpp)