Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce CI workflow with GitHub actions #1381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 191 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: CI Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-mac:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.9'
host: 'mac'
target: 'desktop'
extra: '--external 7z'

- name: Fetch JamTaba static library dependencies
run: |
curl -L "https://www.dropbox.com/s/qckwsmaqlditwpb/JamTaba-static-libs.zip?dl=1" -o JamTaba-static-libs.zip
unzip JamTaba-static-libs.zip -d ${GITHUB_WORKSPACE}

- name: Fetch VST SDK
run: |
curl -L "https://www.dropbox.com/s/9lxowvn7k3bfkf1/VST_SDK.zip?dl=1" -o VST_SDK.zip
unzip VST_SDK.zip -d ${GITHUB_WORKSPACE}

- name: Create xcrun symlink for old Qmake
run: |
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

- name: Build Standalone MacOS
run: |
pushd ${GITHUB_WORKSPACE}/PROJECTS/Standalone
qmake Standalone.pro -r -spec macx-clang -config release CONFIG+=x86_64
lrelease Standalone.pro
make -s -j 4
macdeployqt Jamtaba2.app
popd

# - name: Build AU plugin
# run: |
# pushd ${GITHUB_WORKSPACE}/PROJECTS/AUPlugin
# #xcodebuild -project JamTaba.xcodeproj -scheme JamTaba -target CocoaUI clean build
# xcodebuild -project JamTaba.xcodeproj -target JamTaba clean build
# popd

- name: Create MacOS installer
run: |
pushd ${GITHUB_WORKSPACE}/installers/mac
npm install -g appdmg
mv ${GITHUB_WORKSPACE}/PROJECTS/Standalone/JamTaba2.app .
# mv ${GITHUB_WORKSPACE}/PROJECTS/AUPlugin/Release/JamTaba.component .
touch JamTaba.component
appdmg node-appdmg.json ~/JamTaba_2_Installer.dmg
popd

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: macOS Standalone 64-bit
path: ~/JamTaba_2_Installer.dmg

build-win:
runs-on: windows-2016

steps:
- uses: actions/checkout@v2

# - name: Cache Visual Studio 2013
# id: cache-vs2013
# uses: actions/cache@v2
# with:
# path: C:\Program Files (x86)\Microsoft Visual Studio 12.0
# key: ${{ runner.os }}-vs2013

- name: Install Visual Studio 2013
# if: steps.cache-vs2013.outputs.cache-hit != 'true'
run: |
choco install visualstudio2013professional

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.9'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2013_64'
extra: '--external 7z'

- name: Fetch JamTaba static library dependencies
run: |
Invoke-WebRequest -Uri "https://www.dropbox.com/s/qckwsmaqlditwpb/JamTaba-static-libs.zip?dl=1" -OutFile JamTaba-static-libs.zip
Expand-Archive -Force -Path JamTaba-static-libs.zip -DestinationPath $env:GITHUB_WORKSPACE

- name: Fetch VST SDK
run: |
Invoke-WebRequest -Uri "https://www.dropbox.com/s/9lxowvn7k3bfkf1/VST_SDK.zip?dl=1" -OutFile VST_SDK.zip
Expand-Archive -Force -Path VST_SDK.zip -DestinationPath $env:GITHUB_WORKSPACE

- name: Build Standalone Windows
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
pushd %GITHUB_WORKSPACE%\PROJECTS\Standalone
qmake.exe Standalone.pro -r -spec win32-msvc CONFIG+=release
nmake.exe
mkdir artifact
windeployqt --dir artifact release\JamTaba2.exe
copy release\JamTaba2.exe artifact
popd

# - name: Build VST Plugin
# shell: cmd
# run: |
# call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
# pushd %GITHUB_WORKSPACE%\PROJECTS\VstPlugin
# LIB=%LIB%;"%Qt5_Dir%\lib"
# QMAKE_MSC_VER=1800
# qmake.exe VstPlugin.pro -r -spec win32-msvc CONFIG+=release
# nmake.exe
# copy release\JamtabaVST2.dll %GITHUB_WORKSPACE%\PROJECTS\Standalone\artifact
# popd

- name: Build VST Scanner
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
pushd %GITHUB_WORKSPACE%\PROJECTS\VstScanner
qmake.exe VstScanner.pro -r -spec win32-msvc CONFIG+=release
nmake.exe
copy %GITHUB_WORKSPACE%\PROJECTS\Standalone\release\VstScanner.exe %GITHUB_WORKSPACE%\PROJECTS\Standalone\artifact
popd

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: Windows Standalone 64-bit
path: PROJECTS/Standalone/artifact


build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.9'
host: 'linux'
target: 'desktop'
extra: '--external 7z'

- name: Fetch JamTaba static library dependencies
run: |
curl -L "https://www.dropbox.com/s/qckwsmaqlditwpb/JamTaba-static-libs.zip?dl=1" -o JamTaba-static-libs.zip
unzip JamTaba-static-libs.zip -d ${GITHUB_WORKSPACE}

- name: Fetch VST SDK
run: |
curl -L "https://www.dropbox.com/s/9lxowvn7k3bfkf1/VST_SDK.zip?dl=1" -o VST_SDK.zip
unzip VST_SDK.zip -d ${GITHUB_WORKSPACE}

- name: Install Linux package dependencies
run: |
sudo apt-get install libasound2-dev

- name: Build Linux Projects and Create Installer
run: |
pushd ${GITHUB_WORKSPACE}/installers/linux
curl -L "https://github.com/megastep/makeself/releases/download/release-2.4.2/makeself-2.4.2.run" -O
chmod a+x makeself-2.4.2.run
./makeself-2.4.2.run
export PATH=${PATH}:${PWD}/makeself-2.4.2
mkdir ~/Desktop
source ./build_installer.sh "${Qt5_DIR}" "${Qt5_DIR}/lib"
popd

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: Linux Installer
path: ~/Desktop/*.run
2 changes: 1 addition & 1 deletion installers/linux/build_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ cp $qtLibDir/libQt5XcbQpa.so.* packageFiles/
cp $qtLibDir/libicui18n.so.* packageFiles/
cp $qtLibDir/libicuuc.so.* packageFiles/
cp $qtLibDir/libicudata.so.* packageFiles/
cp $qtLibDir/qt5/plugins/platforms/libqxcb.so packageFiles/platforms
cp $qtDir/plugins/platforms/libqxcb.so packageFiles/platforms
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path may be dependent on the Qt version, I had to change it to build with 5.9.



chmod +x packageFiles/installer_script.sh
Expand Down