kopia lustrzana https://github.com/jameshball/osci-render
Add GitHub actions
rodzic
95ccbacc42
commit
34e65b6fd1
|
@ -0,0 +1,28 @@
|
||||||
|
name: Build Linux
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- release
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fix up git URLs
|
||||||
|
run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig
|
||||||
|
shell: bash
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
- name: "Run script"
|
||||||
|
run: |
|
||||||
|
export OS="linux"
|
||||||
|
./ci/build.sh
|
||||||
|
shell: bash
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Binaries
|
||||||
|
path: bin
|
||||||
|
retention-days: 1
|
|
@ -0,0 +1,28 @@
|
||||||
|
name: Build macOS
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- release
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build macOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Fix up git URLs
|
||||||
|
run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig
|
||||||
|
shell: bash
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
- name: "Run script"
|
||||||
|
run: |
|
||||||
|
export OS="mac"
|
||||||
|
./ci/build.sh
|
||||||
|
shell: bash
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Binaries
|
||||||
|
path: bin
|
||||||
|
retention-days: 1
|
|
@ -0,0 +1,28 @@
|
||||||
|
name: Build Windows
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- release
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Fix up git URLs
|
||||||
|
run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig
|
||||||
|
shell: bash
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
- name: "Run script"
|
||||||
|
run: |
|
||||||
|
export OS="win"
|
||||||
|
./ci/build.sh
|
||||||
|
shell: bash
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Binaries
|
||||||
|
path: bin
|
||||||
|
retention-days: 1
|
|
@ -0,0 +1,96 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
PLUGIN="osci-render"
|
||||||
|
|
||||||
|
# linux specific stiff
|
||||||
|
if [ $OS = "linux" ]; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install clang git ladspa-sdk freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0 juce-tools xvfb
|
||||||
|
fi
|
||||||
|
|
||||||
|
ROOT=$(cd "$(dirname "$0")/.."; pwd)
|
||||||
|
cd "$ROOT"
|
||||||
|
echo "$ROOT"
|
||||||
|
rm -Rf bin
|
||||||
|
mkdir bin
|
||||||
|
|
||||||
|
BRANCH=${GITHUB_REF##*/}
|
||||||
|
echo "$BRANCH"
|
||||||
|
|
||||||
|
cd "$ROOT/ci"
|
||||||
|
rm -Rf bin
|
||||||
|
mkdir bin
|
||||||
|
|
||||||
|
# Get the hash
|
||||||
|
cd "$ROOT/modules/juce"
|
||||||
|
HASH=`git rev-parse HEAD`
|
||||||
|
echo "Hash: $HASH"
|
||||||
|
|
||||||
|
# Get the Projucer
|
||||||
|
cd "$ROOT/ci/bin"
|
||||||
|
PROJUCER_OS=$OS
|
||||||
|
if [ "$OS" = "win" ]; then
|
||||||
|
PROJUCER_OS="windows"
|
||||||
|
elif [ "$OS" = "mac" ]; then
|
||||||
|
PROJUCER_OS="osx"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -s -S "https://api.juce.com/api/v1/download/juce/latest/$PROJUCER_OS" -o Projucer.zip
|
||||||
|
unzip Projucer.zip
|
||||||
|
|
||||||
|
# Resave jucer file
|
||||||
|
if [ "$OS" = "mac" ]; then
|
||||||
|
"$ROOT/ci/bin/JUCE/Projucer.app/Contents/MacOS/Projucer" --resave "$ROOT/plugin/$PLUGIN.jucer"
|
||||||
|
elif [ "$OS" = "linux" ]; then
|
||||||
|
"$ROOT/ci/bin/JUCE/Projucer" --resave "$ROOT/plugin/$PLUGIN.jucer"
|
||||||
|
else
|
||||||
|
"$ROOT/ci/bin/JUCE/Projucer.exe" --resave "$ROOT/plugin/$PLUGIN.jucer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build mac version
|
||||||
|
if [ "$OS" = "mac" ]; then
|
||||||
|
cd "$ROOT/plugin/Builds/MacOSX"
|
||||||
|
xcodebuild -configuration Release || exit 1
|
||||||
|
|
||||||
|
cp -R ~/Library/Audio/Plug-Ins/VST3/$PLUGIN.vst3 "$ROOT/ci/bin"
|
||||||
|
cp -R ~/Library/Audio/Plug-Ins/Components/$PLUGIN.component "$ROOT/ci/bin"
|
||||||
|
|
||||||
|
cd "$ROOT/ci/bin"
|
||||||
|
|
||||||
|
zip -r ${PLUGIN}_Mac.zip $PLUGIN.vst3 $PLUGIN.component
|
||||||
|
cp ${PLUGIN}_Mac.zip "$ROOT/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build linux version
|
||||||
|
if [ "$OS" = "linux" ]; then
|
||||||
|
cd "$ROOT/plugin/Builds/LinuxMakefile"
|
||||||
|
make CONFIG=Release
|
||||||
|
|
||||||
|
cp -r ./build/$PLUGIN.vst3 "$ROOT/ci/bin"
|
||||||
|
|
||||||
|
cd "$ROOT/ci/bin"
|
||||||
|
|
||||||
|
# Upload
|
||||||
|
cd "$ROOT/ci/bin"
|
||||||
|
zip -r ${PLUGIN}_Linux.zip $PLUGIN.vst3
|
||||||
|
cp ${PLUGIN}_Linux.zip "$ROOT/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build Win version
|
||||||
|
if [ "$OS" = "win" ]; then
|
||||||
|
VS_WHERE="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
|
||||||
|
|
||||||
|
MSBUILD_EXE=$("$VS_WHERE" -latest -requires Microsoft.Component.MSBuild -find "MSBuild\**\Bin\MSBuild.exe")
|
||||||
|
echo $MSBUILD_EXE
|
||||||
|
|
||||||
|
cd "$ROOT/plugin/Builds/VisualStudio2022"
|
||||||
|
"$MSBUILD_EXE" "$PLUGIN.sln" "//p:VisualStudioVersion=16.0" "//m" "//t:Build" "//p:Configuration=Release" "//p:Platform=x64" "//p:PreferredToolArchitecture=x64"
|
||||||
|
|
||||||
|
cd "$ROOT/ci/bin"
|
||||||
|
mkdir -p VST3
|
||||||
|
|
||||||
|
cp "$ROOT/plugin/Builds/VisualStudio2022/x64/Release/VST3/${PLUGIN}.vst3" ${PLUGIN}.vst3
|
||||||
|
|
||||||
|
7z a ${PLUGIN}_Win.zip ${PLUGIN}.vst3
|
||||||
|
cp ${PLUGIN}_Win.zip "$ROOT/bin"
|
||||||
|
fi
|
Ładowanie…
Reference in New Issue