Skip to content

Commit

Permalink
Build chowdsp in Release and reenable windows and linux automated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-L committed Oct 29, 2022
1 parent 08845d8 commit 940c99f
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 95 deletions.
188 changes: 94 additions & 94 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,38 @@ jobs:
# only modify plugin version if no tag was created
if: "! startsWith(github.ref, 'refs/tags/v')"
# build:
# name: ${{ matrix.platform }}
# needs: modify-plugin-version
# runs-on: ubuntu-latest
# if: github.repository_owner == 'Simon-L'
# container:
# image: ghcr.io/qno/rack-plugin-toolchain-win-linux:v2
# options: --user root
# strategy:
# fail-fast: false
# matrix:
# platform: [ win, linux ]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - uses: actions/cache@v2
# id: plugin-version-cache
# with:
# path: plugin.json
# key: ${{ github.sha }}-${{ github.run_id }}
# - name: Build plugin
# run: |
# export PLUGIN_DIR=$GITHUB_WORKSPACE
# pushd ${{ env.rack-plugin-toolchain-dir }}
# sed -i "s/-G 'MSYS Makefiles'/-DCMAKE_SYSTEM_NAME=Windows/g" Rack-SDK-win/dep.mk
# make plugin-build-${{ matrix.platform }}
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
# name: ${{ matrix.platform }}
build:
name: ${{ matrix.platform }}
needs: modify-plugin-version
runs-on: ubuntu-latest
if: github.repository_owner == 'Simon-L'
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux:v2
options: --user root
strategy:
fail-fast: false
matrix:
platform: [ win, linux ]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v2
id: plugin-version-cache
with:
path: plugin.json
key: ${{ github.sha }}-${{ github.run_id }}
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE
pushd ${{ env.rack-plugin-toolchain-dir }}
sed -i "s/-G 'MSYS Makefiles'/-DCMAKE_SYSTEM_NAME=Windows/g" Rack-SDK-win/dep.mk
make plugin-build-${{ matrix.platform }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: ${{ matrix.platform }}

build-mac:
name: mac
Expand Down Expand Up @@ -100,66 +100,66 @@ jobs:
path: dist
name: mac

# publish:
# name: Publish Release
# # only create a release if a tag was created that is called e.g. v1.2.3
# # see also https://vcvrack.com/manual/Manifest#version
# if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Simon-L'
# runs-on: ubuntu-latest
# needs: [ build, build-mac ]
# steps:
# - uses: actions/checkout@v3
# - uses: FranzDiebold/[email protected]
# - name: Check if plugin version matches tag
# run: |
# pluginversion=`jq -r '.version' plugin.json`
# if [ "v$pluginversion" != "${{ env.GITHUB_REF_NAME }}" ]; then
# echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '${{ env.GITHUB_REF_NAME }}'"
# exit 1
# fi
# - name: Create Release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# ${{ env.GITHUB_REPOSITORY_NAME }} VCV Rack Plugin ${{ env.GITHUB_REF_NAME }}
# draft: false
# prerelease: false
# - uses: actions/download-artifact@v2
# with:
# path: _artifacts
# - name: Upload release assets
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: _artifacts/**/*.vcvplugin
# tag: ${{ github.ref }}
# file_glob: true
publish:
name: Publish Release
# only create a release if a tag was created that is called e.g. v1.2.3
# see also https://vcvrack.com/manual/Manifest#version
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Simon-L'
runs-on: ubuntu-latest
needs: [ build, build-mac ]
steps:
- uses: actions/checkout@v3
- uses: FranzDiebold/[email protected]
- name: Check if plugin version matches tag
run: |
pluginversion=`jq -r '.version' plugin.json`
if [ "v$pluginversion" != "${{ env.GITHUB_REF_NAME }}" ]; then
echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '${{ env.GITHUB_REF_NAME }}'"
exit 1
fi
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ env.GITHUB_REPOSITORY_NAME }} VCV Rack Plugin ${{ env.GITHUB_REF_NAME }}
draft: false
prerelease: false
- uses: actions/download-artifact@v2
with:
path: _artifacts
- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _artifacts/**/*.vcvplugin
tag: ${{ github.ref }}
file_glob: true

# publish-nightly:
# name: Publish Nightly
# # only create a release if a tag was created that is called e.g. v1.2.3
# # see also https://vcvrack.com/manual/Manifest#version
# if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'Simon-L' }}
# runs-on: ubuntu-latest
# needs: [ build, build-mac ]
# steps:
# - uses: actions/download-artifact@v2
# with:
# path: _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/**/*.vcvplugin
# tag: Nightly
# file_glob: true
publish-nightly:
name: Publish Nightly
# only create a release if a tag was created that is called e.g. v1.2.3
# see also https://vcvrack.com/manual/Manifest#version
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'Simon-L' }}
runs-on: ubuntu-latest
needs: [ build, build-mac ]
steps:
- uses: actions/download-artifact@v2
with:
path: _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/**/*.vcvplugin
tag: Nightly
file_glob: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(chowdsp):
echo "add_subdirectory(../chowdsp_utils .)" >> dep/libchowdsp/CMakeLists.txt
echo "setup_chowdsp_lib(chowdsp MODULES chowdsp_filters)" >> dep/libchowdsp/CMakeLists.txt
echo "target_compile_features(chowdsp PRIVATE cxx_std_17)" >> dep/libchowdsp/CMakeLists.txt
cd dep/libchowdsp && $(CMAKE) . && make -j16
cd dep/libchowdsp && $(CMAKE) . -DCMAKE_BUILD_TYPE=Release && make -j16
git clone https://github.com/Chowdhury-DSP/chowdsp_wdf dep/chowdsp_wdf

# Careful about linking to shared libraries, since you can't assume much about the user's environment and library search path.
Expand Down

0 comments on commit 940c99f

Please sign in to comment.