Run VCV unit tests #108
Workflow file for this run
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
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 | |
paths: | |
- 'vcv/**' | |
- 'shared/**' | |
- '!**.md' # Skip docs | |
- '!shared/svgextract' # Skip generator script (still run CI if generated files change) | |
- '!shared/gen_minblep' # Skip generator script (still run CI if generated files change) | |
- '!shared/tableGen' # Skip generator script (still run CI if generated files change) | |
env: | |
rack-sdk-version: latest | |
jobs: | |
build-tests-lin-x64: | |
if: ${{ github.event_name == 'push' || inputs.linux_x64 }} | |
name: lin-x64 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
defaults: | |
run: | |
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++ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
token: ${{ secrets.CHECKOUT_TOKEN }} | |
- name: Install windows dependencies (MSYS2) | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
install: >- | |
git wget make tar unzip zip mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-cmake autoconf automake libtool mingw-w64-x86_64-jq python zstd mingw-w64-x86_64-pkgconf | |
- name: Get Rack-SDK | |
run: | | |
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 | |