forked from olive-editor/olive
-
Notifications
You must be signed in to change notification settings - Fork 3
174 lines (157 loc) · 6.62 KB
/
ci.yml
File metadata and controls
174 lines (157 loc) · 6.62 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: CI
on:
push:
pull_request:
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2022]
env:
CMAKE_BUILD_TYPE: Release
RUN_OFX_ITEST: "0"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
ninja-build pkg-config \
qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools qt6-declarative-dev \
libavcodec-dev libavformat-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev \
libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev libopencv-dev \
portaudio19-dev libgl1-mesa-dev libxkbcommon-dev libgtest-dev openimageio-tools
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install ninja pkg-config qt@6 ffmpeg openimageio opencolorio openexr portaudio expat googletest
echo "$(brew --prefix qt@6)/bin" >> "$GITHUB_PATH"
echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@6)" >> "$GITHUB_ENV"
- name: Build OpenTimelineIO (macOS)
if: runner.os == 'macOS'
run: |
git clone --depth 1 --branch v0.16.0 https://github.com/PixarAnimationStudios/OpenTimelineIO.git
cmake -S OpenTimelineIO -B OpenTimelineIO/build -G Ninja \
-DOTIO_SHARED_LIBS=ON \
-DOTIO_PYTHON_BINDINGS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PWD}/otio-install"
cmake --build OpenTimelineIO/build
cmake --install OpenTimelineIO/build
echo "OTIO_LOCATION=${PWD}/otio-install" >> "$GITHUB_ENV"
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
base-devel
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-pkgconf
git
mingw-w64-ucrt-x86_64-ffmpeg
mingw-w64-ucrt-x86_64-openimageio
mingw-w64-ucrt-x86_64-opencolorio
mingw-w64-ucrt-x86_64-openexr
mingw-w64-ucrt-x86_64-imath
mingw-w64-ucrt-x86_64-expat
mingw-w64-ucrt-x86_64-portaudio
mingw-w64-ucrt-x86_64-pugixml
mingw-w64-ucrt-x86_64-rapidjson
mingw-w64-ucrt-x86_64-spdlog
mingw-w64-ucrt-x86_64-fmt
mingw-w64-ucrt-x86_64-opentimelineio
mingw-w64-ucrt-x86_64-gtest
mingw-w64-ucrt-x86_64-qt6-base
mingw-w64-ucrt-x86_64-qt6-declarative
mingw-w64-ucrt-x86_64-qt6-multimedia
mingw-w64-ucrt-x86_64-qt6-tools
mingw-w64-ucrt-x86_64-qt6-svg
mingw-w64-ucrt-x86_64-qt6-imageformats
- name: Configure (Linux)
if: runner.os == 'Linux'
run: |
cmake -S . -B build -G Ninja \
-DBUILD_TESTS=ON \
-DOCIO_LOCATION=/usr \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
- name: Configure (macOS)
if: runner.os == 'macOS'
run: |
cmake -S . -B build -G Ninja \
-DBUILD_TESTS=ON \
-DOCIO_LOCATION=$(brew --prefix opencolorio) \
-DOTIO_LOCATION=${OTIO_LOCATION} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
- name: Configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cmake -S . -B build -G Ninja \
-DBUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Build (macOS)
if: runner.os == 'macOS'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Build (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Build OpenFX misc plugins (Linux, optional)
if: runner.os == 'Linux' && env.RUN_OFX_ITEST == '1'
run: |
git clone --depth 1 https://github.com/NatronGitHub/openfx-misc.git
cmake -S openfx-misc -B openfx-misc/build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
cmake --build openfx-misc/build
echo "OAK_OFX_ITEST=1" >> "$GITHUB_ENV"
echo "OAK_OFX_PLUGIN_PATH=${PWD}/openfx-misc/build" >> "$GITHUB_ENV"
echo "OAK_OFX_PLUGIN_ID=net.sf.openfx.ChromaKeyerPlugin" >> "$GITHUB_ENV"
- name: Build OpenFX misc plugins (macOS, optional)
if: runner.os == 'macOS' && env.RUN_OFX_ITEST == '1'
run: |
git clone --depth 1 https://github.com/NatronGitHub/openfx-misc.git
cmake -S openfx-misc -B openfx-misc/build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
cmake --build openfx-misc/build
echo "OAK_OFX_ITEST=1" >> "$GITHUB_ENV"
echo "OAK_OFX_PLUGIN_PATH=${PWD}/openfx-misc/build" >> "$GITHUB_ENV"
echo "OAK_OFX_PLUGIN_ID=net.sf.openfx.ChromaKeyerPlugin" >> "$GITHUB_ENV"
- name: Build OpenFX misc plugins (Windows, optional)
if: runner.os == 'Windows' && env.RUN_OFX_ITEST == '1'
shell: pwsh
run: |
git clone --depth 1 https://github.com/NatronGitHub/openfx-misc.git
cmake -S openfx-misc -B openfx-misc/build -G Ninja `
-DCMAKE_BUILD_TYPE=Release
cmake --build openfx-misc/build
"OAK_OFX_ITEST=1" | Out-File -FilePath $env:GITHUB_ENV -Append
"OAK_OFX_PLUGIN_PATH=$env:GITHUB_WORKSPACE\\openfx-misc\\build" | Out-File -FilePath $env:GITHUB_ENV -Append
"OAK_OFX_PLUGIN_ID=net.sf.openfx.ChromaKeyerPlugin" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Test (Linux)
if: runner.os == 'Linux'
env:
QT_QPA_PLATFORM: offscreen
run: ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }}
- name: Test (macOS)
if: runner.os == 'macOS'
run: ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }}
- name: Test (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
env:
QT_QPA_PLATFORM: offscreen
LIBGL_ALWAYS_SOFTWARE: 1
run: ctest --test-dir build --output-on-failure -C ${CMAKE_BUILD_TYPE}