-
Notifications
You must be signed in to change notification settings - Fork 345
166 lines (146 loc) · 5.41 KB
/
ci.yml
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
name: Tests
on:
workflow_dispatch: {}
push:
branches:
- RB-2.5
- RB-2.6
- fix-ci # For testing. Remove before commit.
paths-ignore:
- Documentation
pull_request:
branches:
- RB-2.5
- RB-2.6
paths-ignore:
- Documentation
jobs:
unix_test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.special-invocation }}bash -l {0}
env:
CI: 'True'
PYTHON_VERSION: ${{ matrix.python-version }}
OCIO_CONFIG_VERSION: 2.5
MATRIX_OS: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] #macos-latest
python-version: ['3.10']
include:
- os: ubuntu-latest
special-invocation: 'xvfb-run --auto-servernum '
python-version: '3.10'
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux system packages
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
sudo apt update
sudo apt install build-essential libboost-serialization-dev libboost-system-dev libexpat1-dev libcairo2-dev \
qt5-qmake qtbase5-dev qtdeclarative5-dev \
python3-dev libshiboken2-dev libpyside2-dev python3-pyside2.qtwidgets python3-qtpy \
libwayland-dev libwayland-client0 libwayland-egl1 \
extra-cmake-modules clang
- name: Install Macos system packages
if: contains(matrix.os, 'macos')
shell: bash
run: |
brew install xctool python@2 boost giflib jpeg libpng libtiff libxml2 openssl pcre readline sqlite expat cairo \
gnu-sed glew openssl ilmbase openexr freetype fontconfig ffmpeg openjpeg libraw libheif openvdb
- name: Download OpenColorIO-Configs
run: |
wget https://github.com/NatronGitHub/OpenColorIO-Configs/archive/Natron-v${OCIO_CONFIG_VERSION}.tar.gz
tar xzf Natron-v${OCIO_CONFIG_VERSION}.tar.gz
mv OpenColorIO-Configs-Natron-v${OCIO_CONFIG_VERSION} OpenColorIO-Configs
- name: Build Unix
run: |
mkdir build && cd build
cmake ../
make -j2
- name: Run Unix Tests
id: run-unix-tests
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd build
mkdir Plugins && cd Plugins
wget https://github.com/NatronGitHub/openfx-io/releases/download/natron_testing/openfx-io-build-ubuntu_22-testing.zip
unzip openfx-io-build-ubuntu_22-testing.zip
cd ..
OFX_PLUGIN_PATH=$PWD/Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
- name: Upload ${{ matrix.os }} Test Log artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
- name: Check for test failures
if: steps.run-unix-tests.outcome == 'failure'
run: exit 1
win-test:
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: msys2 {0}
env:
CI: 'True'
PYTHON_VERSION: ${{ matrix.python-version }}
OCIO_CONFIG_VERSION: 2.5
MATRIX_OS: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest]
python-version: ['3.10']
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Windows system packages
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git base-devel mingw-w64-x86_64-cc mingw-w64-x86_64-qt5-base mingw-w64-x86_64-pyside2
mingw-w64-x86_64-shiboken2 mingw-w64-x86_64-python-qtpy mingw-w64-x86_64-ninja
mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-cairo mingw-w64-x86_64-expat
mingw-w64-x86_64-wget unzip
- name: Download OpenColorIO-Configs
run: |
wget https://github.com/NatronGitHub/OpenColorIO-Configs/archive/Natron-v${OCIO_CONFIG_VERSION}.tar.gz
tar xzf Natron-v${OCIO_CONFIG_VERSION}.tar.gz
mv OpenColorIO-Configs-Natron-v${OCIO_CONFIG_VERSION} OpenColorIO-Configs
- name: Build Windows
run: |
mkdir build && cd build
cmake ../
ninja
- name: Run Windows Tests
id: run-windows-tests
# Allow continuing after error so logs can be uploaded.
continue-on-error: true
run: |
cd build
mkdir Plugins && cd Plugins
wget https://github.com/NatronGitHub/openfx-io/releases/download/natron_testing/openfx-io-build-windows_latest-testing.zip
unzip openfx-io-build-windows_latest-testing.zip
cd ..
PYTHONHOME=/mingw64 OFX_PLUGIN_PATH=$PWD/Plugins OCIO=$PWD/../OpenColorIO-Configs/blender/config.ocio ctest -V
- name: Upload ${{ matrix.os }} Test Log artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} Test Logs
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
- name: Check for test failures
if: steps.run-windows-tests.outcome == 'failure'
run: exit 1