Skip to content

Commit

Permalink
Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
stoermelder committed Apr 7, 2020
1 parent 179c5b4 commit 5572e56
Show file tree
Hide file tree
Showing 7 changed files with 1,070 additions and 0 deletions.
32 changes: 32 additions & 0 deletions LICENSE-dist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#### FUNDAMENTAL ####

Copyright (c) 2016-2018 Andrew Belt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



#### AUDIBLE INSTRUMENTS

Copyright 2016 Andrew Belt

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



#### CORE and VCV RACK ####

All VCV Rack source code is copyright © 2019 Andrew Belt and licensed under the GNU General Public License v3.0 with the "VCV Rack Non-Commercial Plugin License Exception", allowed under section 7 of GPLv3, and a commercial licensing option.
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- v1

pr:
- v1

jobs:
- job: Build
strategy:
matrix:
mac:
imageName: 'macos-10.14'
isMac: true
windows:
imageName: 'vs2017-win2016'
isWindows: true
linux:
imageName: 'ubuntu-16.04'
isLinux: true

pool:
vmImage: $(imageName)

steps:
- checkout: self
fetchDepth: 1
# submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github

- bash: |
uname -a
git submodule update --init --recursive
pushd $AGENT_TEMPDIRECTORY
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-1.1.6.zip
unzip Rack-SDK.zip
displayName: Get Rack
- bash: |
chmod +x scripts/resetversion.sh
./scripts/resetversion.sh
displayName: Update Version in plugins.json
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
export CC=gcc
make win-dist
mkdir products_win/
cp dist/*zip products_win/
displayName: Build Windows Plugins
condition: variables.isWindows
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
make dist
mkdir products_mac/
cp dist/*zip products_mac/
displayName: Build Mac Plugins
condition: variables.isMac
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
sudo apt-get install libglu-dev
make dist
mkdir products_lin/
cp dist/*zip products_lin/
displayName: Build Linux Plugins
condition: variables.isLinux
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_LINUX'
targetPath: 'products_lin/'
displayName: Publish Linux Zip
condition: variables.isLinux

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_MACOS'
targetPath: 'products_mac/'
displayName: Publish macOS Zip
condition: variables.isMac

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_WIN'
targetPath: 'products_win/'
displayName: Publish Windows Zip
condition: variables.isWindows


- job: UpdateGithubRelease
dependsOn: Build
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/v1'), eq(variables['Build.SourceBranch'], 'refs/heads/azure-test')))

steps:

- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_LINUX'
targetPath: $(Build.ArtifactStagingDirectory)

- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_MACOS'
targetPath: $(Build.ArtifactStagingDirectory)

- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_WIN'
targetPath: $(Build.ArtifactStagingDirectory)

- bash: |
ls -l $(Build.ArtifactStagingDirectory)
export EXTEND_TAG=`date "+%Y%m%d"`
for file in $(Build.ArtifactStagingDirectory)/*.zip; do mv "$file" "${file/.zip/-${EXTEND_TAG}.zip}"; done
ls -l $(Build.ArtifactStagingDirectory)
displayName: Tag asset names with Date
- bash: |
chmod +x scripts/release-notes.sh
scripts/release-notes.sh > $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
displayName: Fake up release notes
- task: GitHubRelease@0
displayName: "Update Github Release"
inputs:
gitHubConnection: stoermelder
repositoryName: stoermelder/vcvrack-packtau
action: edit
tag: Nightly
target: '$(Build.SourceVersion)'
addChangeLog: false
releaseNotesFile: $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
isPreRelease: true
assets: $(Build.ArtifactStagingDirectory)/*.zip
Binary file removed plugin.dll
Binary file not shown.
195 changes: 195 additions & 0 deletions scripts/plugin-builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
#!/bin/bash

set -e
set -o xtrace
RACK_FROM_SOURCE=1

help_message()
{
cat <<EOF
What, this isn't build-osx.sh! Come on.
But I read the directory RACK_INSTALL_DIR and use a default if that's not set
--get-rack Downloads rack stuff to a well named spot
--build Builds
--run Builds and runs
--debug Builds and debugs
If RACK_INSTALL_DIR isn't set, I default to ~/dev/VCVRack/V1.0
A typical session could be
./scripts/buildutil.sh --get-rack
./scripts/buildutil.sh --run
EOF
}

un=`uname`
sdkversion=1.1.6
sdk="https://vcvrack.com/downloads/Rack-SDK-${sdkversion}.zip"
slug=`jq -r '{slug} | .[]' plugin.json `

if [ $un = "Darwin" ]; then
runtime="https://vcvrack.com/downloads/Rack-${sdkversion}-mac.zip"
plugin=plugin.dylib
mac=true
fi
if [ $un = "Linux" ]; then
runtime="https://vcvrack.com/downloads/Rack-${sdkversion}-lin.zip"
plugin=plugin.so
fi
if [ -z "$runtime" ]; then
runtime="https://vcvrack.com/downloads/Rack-${sdkversion}-win.zip"
plugin=plugin.dll
fi

if [ -z "$RACK_INSTALL_DIR" ]; then
RACK_INSTALL_DIR="${HOME}/dev/VCVRack/V1.0/"
mkdir -p $RACK_INSTALL_DIR
fi

if [ -z "$RACK_FROM_SOURCE" ]; then
rd=$RACK_INSTALL_DIR/SDK/Rack-SDK
ed=$RACK_INSTALL_DIR/SDK/
ud=User-SDK
else
rd=$RACK_INSTALL_DIR/Source/Rack
ed=$RACK_INSTALL_DIR/Source/
ud=User-SRC
fi

get_rack_sdk()
{
echo "Getting rack into ${RACK_INSTALL_DIR}/SDK"
mkdir -p ${RACK_INSTALL_DIR}/SDK
cd $RACK_INSTALL_DIR/SDK
curl -o Rack_Runtime.zip $runtime
curl -o Rack_SDK.zip $sdk

unzip Rack_Runtime.zip
unzip Rack_SDK.zip

rm Rack_Runtime.zip
rm Rack_SDK.zip
}

build_rack()
{
if [ -z "$RACK_FROM_SOURCE" ]; then
echo "Please set RACK_FROM_SOURCE"
exit 1
fi
mkdir -p ${RACK_INSTALL_DIR}/Source
cd ${RACK_INSTALL_DIR}/Source
rm -rf Rack
git clone https://github.com/vcvrack/Rack.git
cd Rack
git checkout v1
git submodule update --init --recursive
make -j 4 dep
make -j 4
}

run_rack()
{
if [ -z "$mac" ]; then
cd ${ed}/Rack
./Rack -u "$RACK_INSTALL_DIR/${ud}"
else
if [ -z "$RACK_FROM_SOURCE" ]; then
cd $RACK_INSTALL_DIR
"${ed}/Rack.app/Contents/MacOS/Rack" -u "$RACK_INSTALL_DIR/${ud}"
else
cd ${ed}/Rack
./Rack -u "$RACK_INSTALL_DIR/${ud}"
fi
fi
}

clean()
{
RACK_DIR=$rd make clean
}

make_module()
{
echo RACK_DIR=$rd make -k -j 4 $1
RACK_DIR=$rd make -k -j 4 $1
}

install_module()
{
make_module "dist"
mkdir -p $RACK_INSTALL_DIR/${ud}/plugins
mv dist/*zip $RACK_INSTALL_DIR/${ud}/plugins
cd $RACK_INSTALL_DIR/${ud}/plugins
unzip -o *zip
}

install_module_light()
{
slug=`jq -r '{slug} | .[]' plugin.json `
make_module "all"
mkdir -p $RACK_INSTALL_DIR/${ud}/plugins/${slug}
cp $plugin $RACK_INSTALL_DIR/${ud}/plugins/${slug}
}

make_images()
{
pushd $RACK_INSTALL_DIR
"$RACK_INSTALL_DIR/Rack.app/Contents/MacOS/Rack" -u "$RACK_INSTALL_DIR/${ud}" -p 2
popd
slug=`jq -r '{slug} | .[]' plugin.json `
mkdir -p ./docs/screenshots
mv ${RACK_INSTALL_DIR}/${ud}/screenshots/${slug}/*.png ./docs/screenshots
}


command="$1"

case $command in
--help)
help_message
;;
--get-rack)
get_rack_sdk
;;
--build-rack)
build_rack
;;
--make)
if [ -z "$2" ]; then
cm="all"
else
cm=$2
fi
make_module "$cm"
;;
--install)
install_module
;;
--run)
run_rack
;;
--br)
make_module dist
install_module_light
run_rack
;;
--bir)
make_module "all"
install_module
run_rack
;;
--images)
make_images
;;
--clean)
clean
;;
*)
help_message
;;
esac
17 changes: 17 additions & 0 deletions scripts/release-notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

cat <<- EOH
## Automatically generated PackTau build
This build is automatically generated every time I push my changes. As such it is the latest version of the code and may be unstable, unusable, unsuitable for human consumption, and so on.
These assets were built against
https://vcvrack.com/downloads/Rack-SDK-1.1.6.zip
The build date and most recent commits are:
EOH
date
echo ""
echo "Most recent commits:"
echo ""
git log --pretty=oneline | head -3
Loading

0 comments on commit 5572e56

Please sign in to comment.