Skip to content

Commit

Permalink
Merge pull request #153 from 4ms/workflow-vcv-msys-tests
Browse files Browse the repository at this point in the history
Add workflow for VCV tests in msys2
  • Loading branch information
danngreen authored Nov 7, 2023
2 parents e168727 + e1a0eff commit d534264
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test_firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
77 changes: 63 additions & 14 deletions .github/workflows/run_vcv_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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++
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion vcv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions vcv/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit d534264

Please sign in to comment.