From 9e4a8e8a8e3fe128785cb65f5148f928e5c439b2 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Tue, 25 Jan 2022 15:04:51 +0000 Subject: [PATCH 1/4] Update README.md --- README.md | 66 +++++++++++-------------------------------------------- 1 file changed, 13 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 3300bf7..26424ca 100644 --- a/README.md +++ b/README.md @@ -2,68 +2,28 @@ This repository hosts code for generating the SC objects and documentation resources for the Fluid Corpus Manipulation Project. Much of the actual code that does the exciting stuff lives in this repository's principal dependency, the [Fluid Corpus Manipulation Library](https://github.com/flucoma/flucoma-core). -## Pre-requisites +# Minimal Quick Build -- [CMake](http://cmake.org) >= 3.11 -- A C++ 14 compliant compiler for Mac or Windows (via XCode tools on Mac, and Visual Studio 17 >= 15.9 on Windows) +Minimal build steps below. For detailed guidance see https://github.com/flucoma/flucoma-sc/wiki/Compiling -## Dependencies +## Prerequisites -- [SC Source Code](https://github.com/supercollider/supercollider): this is the only dependency we don't (optionally) manage for you, so there must be a version available to point to when you run, using the CMake Variable `SC_PATH` (see below). It can live anywhere on your file system. +* C++14 compliant compiler (clang, GCC or MSVC) +* cmake +* make (or Ninja or XCode or VisualStudio) +* git +* an internet connection +* [SuperCollider Source Code](https://github.com/supercollider/supercollider) -These will be downloaded and configured automatically, unless you pass CMake a source code location on disk for each (see below): +CMake will automatically download the other dependencies needed -- [Fluid Corpus Manipulation Library](https://github.com/flucoma/flucoma-core) -- [Eigen](https://gitlab.com/libeigen/eigen) (3.3.5) -- [HISSTools Library](https://github.com/AlexHarker/HISSTools_Library) - -## I'm in a Hurry... - -...and you already have a development environment set up, understand CMake, and have the SC source available? - -Cool: - -``` +```bash mkdir -p build && cd build -cmake -DSC_PATH= .. +cmake -DSC_PATH= .. make install ``` -This will assemble a clean package in `release-packaging/FluidCorpusManipulation`. - -An alternative to setting up / running CMake directly on the command line is to install the CMake GUI, or use to use the curses GUI `ccmake`. - -Also, with CMake you have a choice of which build system you use. - -- The default on macOS and Linux is `Unix Makefiles`. On macOS you can also use Xcode by passing `-GXcode` to CMake when you first run it. -- The default on Windows is the latest version of Visual Studio installed. However, Visual Studio can open CMake files directly as projects, which has some upsides. When used this way, CMake variables have to be set via a JSON file that MSVC will use to configure CMake. - -## Using Manual Dependencies - -In some cases you may want to use your own copies of the required libraries. Unless specified, the build system will download these automatically. To bypass this behaviour, use the following cache variables: - -- `FLUID_PATH`: location of the Fluid Corpus Manipulation Library -- `FLUID_PARAMDUMP_PATH`: location of `flucoma_paramdump` repository (e.g. for debugging documentation generation) -- `EIGEN_PATH` location of the Eigen library -- `HISS_PATH` location of the HISSTools library - -For example, use this to us your own copy of the Fluid Corpus Manipulation Library: - -``` -cmake -DSC_PATH= -DFLUID_PATH= .. -``` - -To find out which branches / tags / commits of these we use, look in the top level `CMakeLists.txt` of the Fluid Corpus Manipulation Library for the `FetchContent_Declare` statements for each dependency. - -## Compiling for different CPUs - -The build system generally assumes an x86 cpu with AVX instructions (most modern x86 CPUs). To build on another kind of CPU (e.g. older than 2012) you can use the `FLUID_ARCH` cache variable to pass specific flags to your compiler. For example use `-DFLUID_ARCH=-mcpu=native` to optimize for your particular CPU. - -For ARM, we use the following default set of flags (with the Bela in mind): - -``` --march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -``` +This will assemble a package in `release-packaging`. ## Credits #### FluCoMa core development team (in alphabetical order) From 0d82b7c21fd594465042eb448c31760943b298e3 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Sat, 29 Jan 2022 10:46:42 +0000 Subject: [PATCH 2/4] Create release.yml --- .github/workflows/release.yml | 101 ++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a38b51f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,101 @@ +name: Release + +on: + workflow_dispatch: + inputs: + base: + description: 'Base branch to deploy core from' + required: false + default: 'main' + +jobs: + macbuild: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install + + - uses: actions/upload-artifact@v2 + with: + name: macbuild + path: FluCoMa-SC-Mac-"${{ needs.linuxbuild.outputs.version }}".zip + + winbuild: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: remove pdb files + run: Remove-Item install -Recurse -Include *.pdb + + - name: zip release + run: Compress-Archive install/FluidCorpusManipulation FluCoMa-SC-Windows-nightly.zip + + - uses: actions/upload-artifact@v2 + with: + name: winbuild + path: FluCoMa-SC-Windows-"${{ needs.linuxbuild.outputs.version }}".zip + + linuxbuild: + runs-on: ubuntu-18.04 + outputs: + version: ${{ steps.get-version.outputs.version }} + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Linux-nightly.zip FluidCorpusManipulation + working-directory: install + + - id: get-version + run: echo "::set-output name=version::$(cat flucoma.version.rc)" + working-directory: core + + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: FluCoMa-SC-Linux-"${{ needs.linuxbuild.outputs.version }}".zip + + release: + runs-on: ubuntu-latest + needs: [macbuild, winbuild, linuxbuild] + steps: + - uses: actions/download-artifact@v2 + with: + name: macbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: winbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: linuxbuild + path: . + + - name: package and upload + uses: softprops/action-gh-release@v1 + with: + name: ${{ needs.linuxbuild.outputs.version }} + body: "This is a release build of the FluCoMa SuperCollider package. The build hash is ${{ github.sha }}" + files: FluCoMa*.zip + prerelease: true + tag_name: ${{ needs.linuxbuild.outputs.version }} + draft: false From c3adccd2e1bcfc9e04bca1e32216227b6cd3fea0 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 9 Feb 2022 20:14:40 +0000 Subject: [PATCH 3/4] put nightly.yaml on main so we can have nice things --- .github/workflows/nightly.yaml | 92 ++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/nightly.yaml diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml new file mode 100644 index 0000000..5ffbd57 --- /dev/null +++ b/.github/workflows/nightly.yaml @@ -0,0 +1,92 @@ +name: Nightly Releases + +on: + push: + branches: [ dev, ci/** ] + +jobs: + macbuild: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install + + - uses: actions/upload-artifact@v2 + with: + name: macbuild + path: FluCoMa-SC-Mac-nightly.zip + + winbuild: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/sc@v4 + + - name: remove pdb files + run: Remove-Item install -Recurse -Include *.pdb + + - name: zip release + run: Compress-Archive install/FluidCorpusManipulation FluCoMa-SC-Windows-nightly.zip + + - uses: actions/upload-artifact@v2 + with: + name: winbuild + path: FluCoMa-SC-Windows-nightly.zip + + linuxbuild: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Linux-nightly.zip FluidCorpusManipulation + working-directory: install + + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: FluCoMa-SC-Linux-nightly.zip + + release: + runs-on: ubuntu-latest + needs: [macbuild, winbuild, linuxbuild] + steps: + - uses: actions/download-artifact@v2 + with: + name: macbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: winbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: linuxbuild + path: . + + - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true # default: false + tag_name: nightly # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: package and upload + uses: softprops/action-gh-release@v1 + with: + name: FluCoMa SuperCollider Nightly Release + body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" + files: FluCoMa-SC-*.zip + prerelease: true + tag_name: nightly + draft: false From b79331d024bc418f1517c263896816a96a40be99 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 9 Feb 2022 20:16:17 +0000 Subject: [PATCH 4/4] add workflow_dispatch to nightly --- .github/workflows/nightly.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 5ffbd57..fdacdf0 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,6 +1,7 @@ name: Nightly Releases on: + workflow_dispatch: push: branches: [ dev, ci/** ]