[core] Add docs #25
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: 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 libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libxcomposite-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-12, | |
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 . |