-
-
Notifications
You must be signed in to change notification settings - Fork 104
157 lines (135 loc) · 4.71 KB
/
templates.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Template check
on: [push,pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
init_template:
name: Template generation
runs-on: ubuntu-latest
strategy:
matrix:
template:
- score-avnd-simple-template
- score-vfx-template
- score-process-template
- score-device-template
- score-offline-process-template
steps:
- name: Install git
run: |
sudo apt-get update -qq
sudo apt-get install -qq --force-yes git rename perl
- name: Checkout template
uses: actions/checkout@v4
with:
repository: ossia-templates/${{ matrix.template }}
submodules: "recursive"
path: ${{ matrix.template }}
- name: Init template
run: |
cd ${{ matrix.template }}
./init.sh Build
./release.sh
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.template }}
path: "**/score-addon-build.zip"
check:
name: ${{ matrix.template }} (${{ matrix.config.name }})
runs-on: ${{ matrix.config.os }}
needs: init_template
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: "choco install -y 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-get -yq update; sudo apt-get -yq install libgl-dev libegl-dev libdrm-dev libxcomposite-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libxcb-*-dev libX11-*-dev libz-dev libtinfo-dev 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",
}
template:
- score-vfx-template
- score-process-template
- score-device-template
- score-avnd-simple-template
- score-offline-process-template
steps:
- name: Checkout score
uses: actions/checkout@v4
with:
submodules: "recursive"
path: score
fetch-depth: 0 # Needed for getting tags
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.template }}
path: .
- name: Install dependencies
shell: bash
run: |
export DEBIAN_FRONTEND=noninteractive
${{ matrix.config.dependencies }}
- name: Download SDK
shell: bash
run: |
cd score
tools/fetch-sdk.sh
- name: Extract artifact
shell: bash
run: |
find ${{ matrix.template }} -name '*.zip' -exec cmake -E tar xz {} \;
ls
find score-addon-build
ls score-addon-build
- 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 ../score-addon-build \
-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 ../score-addon-build \
-DSCORE_SOURCE_DIR=../score \
-DOSSIA_SDK=${{ matrix.config.sdk }} \
${{ matrix.config.common_flags }} \
${{ matrix.config.release_flags }}
cmake --build .