Add Mac and Windows builds to github actions #39
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: ControlGris CI | |
on: | |
push: | |
branches: ['*'] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
Build-Ubuntu-20-04: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:20.04 | |
steps: | |
- name: Install required packages | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
export TZ=Etc/UTC | |
apt-get update | |
apt-get install -y curl unzip sudo wget lsb-release software-properties-common make build-essential tzdata | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: download JUCE | |
run: curl -L https://github.com/juce-framework/JUCE/releases/download/7.0.1/juce-7.0.1-linux.zip --output JUCE.zip | |
- name: unpack JUCE | |
run: unzip JUCE.zip | |
- name: Install latest Clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
./llvm.sh 18 | |
apt-get install -y clang-18 | |
- name: Install dependencies | |
run: | | |
apt-get install -y ladspa-sdk freeglut3-dev libasound2-dev libcurl4-openssl-dev \ | |
libfreetype6-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev \ | |
mesa-common-dev libjack-dev | |
- name: set global JUCE search paths | |
run: JUCE/Projucer --set-global-search-path linux defaultJuceModulePath /__w/ControlGris/ControlGris/JUCE/modules | |
- name: Generate makefile (Standalone & VST3 only) | |
run: | | |
cd JUCE | |
./Projucer --resave ../ControlGris.jucer --set-exporter LinuxMakefile --set-config Release --set-enabled-targets Standalone,VST3 | |
- name: Compile ControlGris (Standalone & VST3 only) | |
run: | | |
cd Builds/LinuxMakefile | |
make CXX=clang++-18 CONFIG=Release -j8 Standalone VST3 | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ControlGris-Build | |
path: Builds/LinuxMakefile/build/* | |
Build-macOS: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: download JUCE | |
run: curl -L https://github.com/juce-framework/JUCE/releases/download/7.0.1/juce-7.0.1-osx.zip --output JUCE.zip | |
- name: unpack JUCE | |
run: unzip JUCE.zip | |
- name: set global JUCE search paths | |
run: JUCE/Projucer.app/Contents/MacOS/Projucer --set-global-search-path osx defaultJuceModulePath /Users/runner/work/ControlGris/ControlGris/JUCE/modules | |
- name: generate Xcode project | |
run: JUCE/Projucer.app/Contents/MacOS/Projucer --resave ControlGris.jucer | |
- name: build | |
run: xcodebuild -project Builds/MacOSX/ControlGris.xcodeproj -scheme "ControlGris - Standalone Plugin" -configuration Release | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ControlGris-Build-macOS | |
path: Builds/MacOSX/build/* | |
Build-Windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: download JUCE | |
run: curl -L https://github.com/juce-framework/JUCE/releases/download/7.0.1/juce-7.0.1-windows.zip --output JUCE.zip | |
- name: unpack JUCE | |
run: Expand-Archive -Path JUCE.zip -DestinationPath . | |
- name: set global JUCE search paths | |
run: JUCE/Projucer --set-global-search-path windows defaultJuceModulePath ${{ github.workspace }}\JUCE\modules | |
- name: generate Visual Studio project | |
run: JUCE/Projucer --resave ControlGris.jucer | |
- name: Remove VST3 copy step from .vcxproj #this copy step is useless on the pipeline, and causes it to fail | |
run: sed -i '/<PostBuildEvent>/,/<\/PostBuildEvent>/d' Builds/VisualStudio2022/ControlGris_VST3.vcxproj | |
shell: bash | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: build shared code | |
run: msbuild Builds/VisualStudio2022/ControlGris_SharedCode.vcxproj -p:Configuration=Release -p:Platform=x64 | |
- name: build standalone | |
run: msbuild Builds/VisualStudio2022/ControlGris_StandalonePlugin.vcxproj -p:Configuration=Release -p:Platform=x64 | |
- name: build VST3 | |
run: msbuild Builds/VisualStudio2022/ControlGris_VST3.vcxproj -p:Configuration=Release -p:Platform=x64 | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ControlGris-Build-Windows | |
path: | | |
Builds/VisualStudio2022/x64/Release/**/*.vst3 | |
Builds/VisualStudio2022/x64/Release/**/*.exe |