Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 5, 2024
0 parents commit 1309df1
Show file tree
Hide file tree
Showing 22 changed files with 1,667 additions and 0 deletions.
105 changes: 105 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
BasedOnStyle: WebKit

AllowAllArgumentsOnNextLine: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ReflowComments: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AlignConsecutiveDeclarations: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true

BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false

BinPackArguments: false
BinPackParameters: false
ExperimentalAutoDetectBinPacking: false
AllowAllParametersOfDeclarationOnNextLine: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 79
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeCpp11BracedList: false
Standard: c++20
TabWidth: 2
UseTab: Never
CommentPragmas: '^ clang-format:'
StatementMacros: ['E_SIGNAL', 'PROPERTY', 'W_SIGNAL', 'W_PROPERTY', 'W_SLOT']
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"'
Priority: 1
- Regex: '^<(Vst|Vst3|Audio|Magnetism|Control|ControlSurface|RemoteScenario|Explorer|Protocols|Process|State|Device|Media|Midi|JS|Curve|Inspector|Automation|Dataflow|Fx|Library|Mapping|Loop|Recording|PluginSettings|Gfx|Nodal|Pd|LV2|Mixer|Video|Effect|Execution|Engine|LocalTree)'
Priority: 2
- Regex: '^<score/'
Priority: 3
- Regex: '^<core/'
Priority: 4
- Regex: '^<ossia/detail/config'
Priority: 5
- Regex: '^<ossia/'
Priority: 6
- Regex: '^<ossia-qt/'
Priority: 6
- Regex: '^<boost'
Priority: 7
- Regex: '^<Q'
Priority: 8
- Regex: '<([[:alnum:]_]+\/?)+.(h|hpp)>'
Priority: 9
- Regex: '<[[:alnum:]]+>'
Priority: 800

99 changes: 99 additions & 0 deletions .github/workflows/builds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CMake build

on: push

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows",
os: windows-latest,
path: "/c/ossia-sdk/llvm/bin",
common_flags: "-GNinja -DCMAKE_C_COMPILER=c:/ossia-sdk/llvm/bin/clang.exe -DCMAKE_CXX_COMPILER=c:/ossia-sdk/llvm/bin/clang++.exe -DCMAKE_UNITY_BUILD=1",
debug_flags: "-DCMAKE_BUILD_TYPE=Debug",
release_flags: "-DCMAKE_BUILD_TYPE=Release",
dependencies: "cinst ninja",
sdk: "/c/ossia-sdk",
}
- {
name: "Ubuntu",
os: ubuntu-latest,
path: "/opt/ossia-sdk/llvm/bin",
common_flags: "-DCMAKE_C_COMPILER=/opt/ossia-sdk/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/ossia-sdk/llvm/bin/clang++ -DCMAKE_UNITY_BUILD=1",
debug_flags: "-DCMAKE_BUILD_TYPE=Debug",
release_flags: "-DCMAKE_BUILD_TYPE=Release",
dependencies: "sudo apt install libgl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libxcb-*-dev libX11-*-dev libz-dev libtinfo5 libxext-dev",
sdk: "/opt/ossia-sdk",
}
- {
name: "macOS",
os: macos-latest,
common_flags: "-DCMAKE_UNITY_BUILD=1",
debug_flags: "-DCMAKE_BUILD_TYPE=Debug",
release_flags: "-DCMAKE_BUILD_TYPE=Release",
sdk: "/opt/ossia-sdk-x86_64",
}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: "recursive"
path: addon

- name: Checkout score
uses: actions/checkout@v2
with:
repository: ossia/score
submodules: "recursive"
path: score

- name: Install dependencies
shell: bash
run: |
${{ matrix.config.dependencies }}
- name: Download SDK
shell: bash
run: |
cd score
tools/fetch-sdk.sh
- name: Build debug
shell: bash
run: |
mkdir build-debug
cd build-debug
if [[ "${{ matrix.config.path }}" != "" ]]; then
export PATH=${{ matrix.config.path }}:$PATH
fi
cmake ../addon \
-DSCORE_SOURCE_DIR=../score \
-DOSSIA_SDK=${{ matrix.config.sdk }} \
${{ matrix.config.common_flags }} \
${{ matrix.config.debug_flags }}
cmake --build .
- name: Build release
shell: bash
run: |
mkdir build-release
cd build-release
if [[ "${{ matrix.config.path }}" != "" ]]; then
export PATH=${{ matrix.config.path }}:$PATH
fi
cmake ../addon \
-DSCORE_SOURCE_DIR=../score \
${{ matrix.config.common_flags }} \
${{ matrix.config.release_flags }}
cmake --build .
187 changes: 187 additions & 0 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: JIT

on: push

jobs:
build:
name: "${{ matrix.config.name }} ${{ matrix.config.version }}"
runs-on: ${{ matrix.config.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
version: [3.0.0-rc2]
config:
- {
name: "Windows",
os: windows-latest,
score: "win64.exe",
sdk: windows-sdk.zip,
}
- {
name: "Ubuntu",
os: ubuntu-latest,
score: "linux-amd64.AppImage",
sdk: linux-sdk.zip,
}
- {
name: "macOS",
os: macos-latest,
score: "macOS.dmg",
sdk: mac-sdk.zip,
}

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: "recursive"

- name: Download score
shell: bash
run: |
SCORE_FILENAME=ossia.score-${{ matrix.version }}-${{ matrix.config.score }}
curl -L -O "https://github.com/ossia/score/releases/download/v${{ matrix.version }}/$SCORE_FILENAME"
- name: Install score
if: matrix.config.name == 'macOS'
shell: bash
run: |
SCORE_FILENAME=ossia.score-${{ matrix.version }}-${{ matrix.config.score }}
/usr/bin/hdiutil convert -quiet $SCORE_FILENAME -format UDTO -o score
/usr/bin/hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint /Volumes/score score.cdr
ls /Volumes
ls /Volumes/score
- name: Install score
if: matrix.config.name == 'Windows'
shell: bash
run: |
SCORE_FILENAME=ossia.score-${{ matrix.version }}-${{ matrix.config.score }}
7z x $SCORE_FILENAME
- name: Download SDK
shell: bash
run: |
SDK_FILENAME=${{ matrix.config.sdk }}
curl -L -O "https://github.com/ossia/score/releases/download/v${{ matrix.version }}/$SDK_FILENAME"
mkdir -p "$HOME/Documents/ossia/score/sdk"
unzip -qq "$SDK_FILENAME" -d "$HOME/Documents/ossia/score/sdk/${{ matrix.version }}"
- name: Compile
if: matrix.config.name == 'macOS'
shell: bash
run: |
SCORE_FILENAME=/Volumes/score/score.app/Contents/MacOS/score
$SCORE_FILENAME --no-gui --compile-addon $PWD
- name: Compile
if: matrix.config.name == 'Windows'
shell: bash
run: |
SCORE_FILENAME=./score.exe
export SCORE_JIT_SDK="$PWD/sdk/usr"
export QT_FORCE_STDERR_LOGGING=1
export QT_ASSUME_STDERR_HAS_CONSOLE=1
$SCORE_FILENAME --no-gui --compile-addon "$PWD"
- name: Compile
if: matrix.config.name == 'Ubuntu'
shell: bash
run: |
sudo apt -y install xvfb libasound2 libxcb1 libegl1 libglvnd0 libx11-6 libxcb-glx0 libgl1 libdbus-1-3 libxcb-xkb1 libxkbcommon-x11-0 libxcb-xkb1
SCORE_FILENAME=ossia.score-${{ matrix.version }}-${{ matrix.config.score }}
chmod +x $SCORE_FILENAME
xvfb-run --auto-servernum ./$SCORE_FILENAME --no-gui --compile-addon $PWD
build_head:
name: "${{ matrix.config.name }} (latest)"
runs-on: ${{ matrix.config.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows",
os: windows-latest,
score: "win64.exe",
sdk: windows-sdk.zip,
}
- {
name: "Ubuntu",
os: ubuntu-latest,
score: "linux-amd64.AppImage",
sdk: linux-sdk.zip,
}
- {
name: "macOS",
os: macos-latest,
score: "macOS.dmg",
sdk: mac-sdk.zip,
}

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: "recursive"

- name: Download score
shell: bash
run: |
SCORE_FILENAME=ossia.score-master-${{ matrix.config.score }}
curl -L -O "https://github.com/ossia/score/releases/download/continuous/$SCORE_FILENAME"
- name: Install score
if: matrix.config.name == 'macOS'
shell: bash
run: |
SCORE_FILENAME=ossia.score-master-${{ matrix.config.score }}
/usr/bin/hdiutil convert -quiet $SCORE_FILENAME -format UDTO -o score
/usr/bin/hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint /Volumes/score score.cdr
ls /Volumes
ls /Volumes/score
- name: Install score
if: matrix.config.name == 'Windows'
shell: bash
run: |
SCORE_FILENAME=ossia.score-master-${{ matrix.config.score }}
7z x $SCORE_FILENAME
- name: Download SDK
shell: bash
run: |
SDK_FILENAME=${{ matrix.config.sdk }}
curl -L -O "https://github.com/ossia/score/releases/download/continuous/$SDK_FILENAME"
mkdir -p "$HOME/Documents/ossia/score/sdk"
unzip -qq "$SDK_FILENAME" -d "sdk"
- name: Compile
if: matrix.config.name == 'macOS'
shell: bash
run: |
export SCORE_JIT_SDK="$PWD/sdk/usr"
SCORE_FILENAME=/Volumes/score/score.app/Contents/MacOS/score
$SCORE_FILENAME --no-gui --compile-addon "$PWD"
- name: Compile
if: matrix.config.name == 'Windows'
shell: bash
run: |
SCORE_FILENAME=./score.exe
export SCORE_JIT_SDK="$PWD/sdk/usr"
export QT_FORCE_STDERR_LOGGING=1
export QT_ASSUME_STDERR_HAS_CONSOLE=1
$SCORE_FILENAME --no-gui --compile-addon "$PWD"
- name: Compile
if: matrix.config.name == 'Ubuntu'
shell: bash
run: |
sudo apt -y install xvfb libasound2 libxcb1 libegl1 libglvnd0 libx11-6 libxcb-glx0 libgl1 libdbus-1-3 libxcb-xkb1 libxkbcommon-x11-0 libxcb-xkb1
SCORE_FILENAME=ossia.score-master-${{ matrix.config.score }}
export SCORE_JIT_SDK="$PWD/sdk/usr"
chmod +x $SCORE_FILENAME
xvfb-run --auto-servernum ./$SCORE_FILENAME --no-gui --compile-addon "$PWD"
Loading

0 comments on commit 1309df1

Please sign in to comment.