Add a navigation menu for easier accessible nav (#104) #222
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: Build Six Sines | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v**' | |
pull_request: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_plugin: | |
name: Build - ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
name: windows-x64 | |
cmake_args: -DCMAKE_CXX_COMPLIER=clang++ -DCMAKE_C_COMPILER=clang -GNinja | |
- os: macos-latest | |
name: macos | |
cmake_args: -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -GNinja | |
- os: ubuntu-latest | |
name: linux-x64 | |
cmake_args: -GNinja | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Select Xcode Version | |
if: runner.os == 'macOS' | |
run: sudo xcode-select -switch /Applications/Xcode_15.1.app | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- uses: apple-actions/import-codesign-certs@v3 | |
if: runner.os == 'macOS' && github.event_name != 'pull_request' | |
with: | |
p12-file-base64: ${{ secrets.MAC_CERTS_P12 }} | |
p12-password: ${{ secrets.CERT_PWD }} | |
- name: Setup VERSION file for Nightly | |
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'baconpaul' }} | |
run: | | |
echo Nightly-`date +"%Y-%m-%d"` > VERSION | |
- name: Setup VERSION file for Release | |
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'baconpaul' | |
run: | | |
echo ${{ github.ref_name }} > VERSION | |
- name: Install Linux Deps; pick GCC12 | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 | |
- name: Build release version | |
if: github.event_name != 'pull_request' | |
run: | | |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release | |
cmake --build ./build --config Release --target six-sines_all --parallel 3 | |
- name: Make windows zip | |
if: github.event_name != 'pull_request' && runner.os == 'Windows' | |
run: | | |
mkdir build/inst | |
mkdir build/insttmp | |
mv build/CLAP/*.clap build/insttmp | |
mv build/VST3/*.vst3 build/insttmp | |
mv build/*.exe build/insttmp | |
7z a -r build/inst/windows-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.zip build/insttmp/* | |
- name: Make linux tgz | |
if: github.event_name != 'pull_request' && runner.os == 'Linux' | |
run: | | |
mkdir build/inst | |
mkdir build/insttmp | |
mv build/*.clap build/insttmp | |
mv "build/Six Sines" build/isnttmp | |
mv build/Release/*.vst3 build/insttmp | |
cd build/insttmp | |
tar cvzf ../inst/linux-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.tgz . | |
- name: Make Mac | |
if: github.event_name != 'pull_request' && runner.os == 'macOS' | |
run: | | |
export MAC_SIGNING_CERT="${{ secrets.MAC_SIGNING_CERT_NAME }}" | |
export MAC_INSTALLING_CERT="${{ secrets.MAC_INSTALLING_CERT_NAME }}" | |
export MAC_SIGNING_ID="${{ secrets.MAC_SIGNING_ID }}" | |
export MAC_SIGNING_1UPW="${{ secrets.MAC_SIGNING_1UPW }}" | |
export MAC_SIGNING_TEAM="${{ secrets.MAC_SIGNING_TEAM }}" | |
mkdir build/inst | |
cd build | |
../libs/sst/sst-plugininfra/scripts/installer_mac/make_installer.sh "Six Sines" . ../resources/mac_installer inst `date +"%Y-%m-%d"`-`git rev-parse --short HEAD` | |
codesign -d --entitlement - installer-tmp/APP/Six\ Sines.app | |
- name: Configure pull request version | |
if: github.event_name == 'pull_request' | |
run: | | |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug | |
- name: Build pull request version | |
if: github.event_name == 'pull_request' | |
run: | | |
cmake --build ./build --config Debug --target six-sines_all --parallel 3 | |
- name: Find all the six sines | |
run: | | |
find build -name "Six Sines*" -print | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: build/inst | |
name: dawplugin-${{ matrix.name }} | |
publish-plugin-nightly: | |
name: Publish Nightlu | |
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'baconpaul' }} | |
runs-on: ubuntu-latest | |
needs: [build_plugin] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Show Installer Directory | |
run: | | |
ls -R artifacts | |
- name: Delete old release assets | |
uses: mknejp/delete-release-assets@v1 | |
with: | |
token: ${{ github.token }} | |
tag: Nightly # This may also be of the form 'refs/tags/staging' | |
assets: '*' | |
- name: Upload release assets | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: artifacts/**/**/** | |
tag: Nightly | |
file_glob: true | |
- name: Tag Repo | |
uses: richardsimko/[email protected] | |
with: | |
tag_name: Nightly | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-plugin-release: | |
name: Publish Release | |
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'baconpaul' | |
runs-on: ubuntu-latest | |
needs: [build_plugin] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Show Installer Directory | |
run: | | |
ls -R artifacts | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: Release ${{ github.ref_name }} | |
body: | | |
${{ github.event.repository.name }} Release ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
- name: Upload release assets | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: artifacts/**/**/** | |
tag: ${{ github.ref_name }} | |
file_glob: true |