-
Notifications
You must be signed in to change notification settings - Fork 238
823 lines (722 loc) · 33.7 KB
/
Copy pathconan.yml
File metadata and controls
823 lines (722 loc) · 33.7 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
#
name: Conan-OpenRV
on:
schedule:
# Midnight build every day
- cron: "0 0 * * *"
pull_request:
paths:
- '.github/workflows/conan.yml'
- 'openrvcore-conanfile.py'
- 'cmake/dependencies/**'
env:
SKIP_DEPS_CACHE: 'false'
ROCKY_QT6_MODULES: 'debug_info qt3d qt5compat qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwaylandcompositor qtwebchannel qtwebengine qtwebsockets qtwebview'
ROCKY_QT6_ARCHIVES: 'icu qtbase qtdeclarative qtsvg qttools qttranslations qtwayland'
MACOX_X86_64_QT6_MODULES: 'debug_info qt3d qt5compat qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview'
MACOX_X86_64_QT6_ARCHIVES: 'qtbase qtdeclarative qtsvg qttools qttranslations'
WINDOWS_QT6_MODULES: 'debug_info qt3d qt5compat qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview'
WINDOWS_QT6_ARCHIVES: 'd3dcompiler_47 opengl32sw qtbase qtdeclarative qtsvg qttools qttranslations'
jobs:
rocky-linux:
#if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }}
name: 'Rocky Linux ${{ matrix.rocky-version }} ${{ matrix.vfx-platform }}
<qt=${{ matrix.qt-version }},
python=${{ matrix.python-version }},
cmake=${{ matrix.cmake-version }},
arch=${{ matrix.arch-type }},
config=${{ matrix.build-type }}>'
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.image }}
volumes:
- /usr/local/lib/android:/github/home/android
- /usr/share/dotnet:/github/home/dotnet
- /opt/ghc:/github/home/ghc
- /usr/local/.ghcup:/github/home/.ghcup
- /usr/local/graalvm:/github/home/graalvm
- /usr/local/share/powershell:/github/home/powershell
- /usr/local/share/chromium:/github/home/chromium
- /usr/local/lib/node_modules:/github/home/node_modules
- /opt/hostedtoolcache/CodeQL:/github/home/CodeQL
- /usr/local/share/boost:/github/home/boost
strategy:
fail-fast: false
matrix:
include:
# CY2024
- os: "ubuntu-latest"
rocky-version: "8"
image: "amd64/rockylinux:8"
arch-type: "x86_64"
build-type: "Release"
qt-version: "6.5.3"
cmake-version: "3.31.6"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "powertools"
conan-profile: "x86_64_rocky8"
- os: "ubuntu-latest"
rocky-version: "9"
image: "amd64/rockylinux:9"
arch-type: "x86_64"
build-type: "Release"
qt-version: "6.5.3"
cmake-version: "3.31.6"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "crb"
conan-profile: "x86_64_rocky9"
steps:
- name: Display disk space
run: |
df -h /
- name: Clear up some spaces on disk
run: |
# Delete files from host through the volumes
# It will have some "cannot remove" message, but but atleast 10GB will be cleared.
rm -rf /github/home/android || true
rm -rf /github/home/dotnet || true
rm -rf /github/home/ghc || true
rm -rf /github/home/.ghcup || true
rm -rf /github/home/graalvm || true
rm -rf /github/home/powershell || true
rm -rf /github/home/chromium || true
rm -rf /github/home/node_modules || true
rm -rf /github/home/CodeQL || true
rm -rf /github/home/boost || true
- name: Display disk space
run: |
df -h /
- name: Install system dependencies
run: |
dnf install -y epel-release
dnf config-manager --set-enabled ${{ matrix.extra_repo }} devel
dnf install -y which findutils
dnf groupinstall "Development Tools" -y
dnf install -y alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ git libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor meson openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers qt5-qtbase-devel readline-devel sqlite-devel systemd-devel tcl-devel tcsh tk-devel yasm zip zlib-devel wget patchelf pcsc-lite libxkbfile perl-IPC-Cmd perl-Digest-SHA
dnf install -y libX11-devel libXext-devel libXrender-devel libXrandr-devel libXcursor-devel libXi-devel libXxf86vm-devel libxkbcommon-devel
dnf install -y xz-devel mesa-libGLU mesa-libGLU-devel
if [ "${{ matrix.rocky-version }}" = "9" ]; then \
dnf install -y mesa-compat-libOSMesa mesa-compat-libOSMesa-devel; \
else \
dnf install -y mesa-libOSMesa mesa-libOSMesa-devel; \
fi && \
dnf clean all
- name: Install other system dependencies
if: ${{ matrix.rocky-version == '9' }}
run: |
dnf install -y perl-CPAN
cpan FindBin
- name: Install GCC 11 toolchain for Rocky Linux 8
if: ${{ matrix.rocky-version == '8' }}
run: |
retry_count=0
max_retries=5
until [ $retry_count -ge $max_retries ]; do
echo "Attempt $((retry_count + 1)) of $max_retries"
if dnf install -y gcc-toolset-11-toolchain; then
echo "GCC 11 toolchain installed successfully"
break
else
retry_count=$((retry_count + 1))
if [ $retry_count -lt $max_retries ]; then
echo "Attempt $retry_count failed. Retrying in 5 seconds..."
sleep 5
fi
fi
done
if [ $retry_count -ge $max_retries ]; then
echo "Failed to install GCC 11 toolchain after $max_retries attempts"
exit 1
fi
- name: Enable GCC 11 toolchain for Rocky Linux 8
if: ${{ matrix.rocky-version == '8' }}
run: |
source /opt/rh/gcc-toolset-11/enable
echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH
echo "CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc" >> $GITHUB_ENV
echo "CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
gcc --version
g++ --version
- name: Check out repository code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
submodules: recursive
- name: Add repository as safe directory
run: |
git config --global --add safe.directory /__w/OpenRV/OpenRV
- name: Install pyenv
run: |
curl https://pyenv.run | bash
export PYENV_ROOT="$HOME/.pyenv"
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
- name: Setup pyenv
run: |
echo $PATH
pyenv install ${{ matrix.python-version }}
pyenv global ${{ matrix.python-version }}
- name: Display Python installation location
run: |
python -c "import sys; print(sys.executable)"
- name: Install Ninja
run: |
wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
unzip ninja-linux.zip -d ./ninja
echo "$(pwd)/ninja" >> $GITHUB_PATH
ninja --version
- name: Install CMake
run: |
curl -SL -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake-version }}/cmake-${{ matrix.cmake-version }}-Linux-x86_64.tar.gz
tar -xzf cmake.tar.gz
ls
mv cmake-${{ matrix.cmake-version }}-linux-x86_64 ./cmake-${{ matrix.cmake-version }}
echo "$(pwd)/cmake-${{ matrix.cmake-version }}/bin" >> $GITHUB_PATH
- name: Prepare Qt folder
run: |
mkdir -p "${{ github.workspace }}/deps"
- name: Install Qt ${{ matrix.qt-version }}
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
dir: "${{ github.workspace }}/deps"
install-deps: 'false'
modules: ${{ env.ROCKY_QT6_MODULES }}
archives: ${{ env.ROCKY_QT6_ARCHIVES }}
# Caching only save 2 minutes. Keep the cache for longer operations.
cache: false
setup-python: 'false'
tools: 'tools_qtcreator'
set-env: 'true'
tools-only: 'false'
aqtversion: '==3.2.*'
- name: Install Python dependencies
run: |
echo "=== Python Environment Setup ==="
which python3
python3 -c "import sys; print(f'Python executable: {sys.executable}')"
python3 -c "import sys; print(f'Python prefix: {sys.prefix}')"
python3 -c "import site; print(f'Site packages: {site.getsitepackages()}')"
echo "=== Installing dependencies to pyenv environment ==="
# Install to pyenv environment directly (no --user flag)
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install --upgrade -r requirements.txt
python3 -m pip install "six" "patch-ng>=1.18.0,<1.19" "requests>=2.25,<3.0.0" "urllib3>=1.26.6,<2.1"
python3 -m pip install conan
echo "=== Post-installation verification ==="
python3 -c "import sys; print('Python path after installation:'); [print(f' {p}') for p in sys.path]"
- name: Verify Python environment and Conan installation
run: |
echo "=== Python Environment Debug Info ==="
python3 -c "import sys; print(f'Python executable: {sys.executable}')"
python3 -c "import sys; print(f'Python version: {sys.version}')"
python3 -c "import sys; print(f'Python prefix: {sys.prefix}')"
python3 -c "import site; print(f'Site packages dirs: {site.getsitepackages()}')"
echo "=== Installed packages location check ==="
python3 -c "import six; import dateutil; import yaml;"
echo "=== Verifying Conan installation ==="
# Try to find conan in the Python environment first
CONAN_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null) || CONAN_PATH=""
if [ -f "$CONAN_PATH" ]; then
echo "Found Conan in pyenv environment: $CONAN_PATH"
$CONAN_PATH --version
elif [ -f "/github/home/.local/bin/conan" ]; then
echo "Found Conan in user bin: /github/home/.local/bin/conan"
/github/home/.local/bin/conan --version || {
echo "ERROR: Conan in user bin failed, attempting to reinstall to pyenv environment..."
python3 -m pip install --force-reinstall six python-dateutil setuptools
python3 -m pip install --force-reinstall conan
# Try again with pyenv conan
NEW_CONAN_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null)
if [ -f "$NEW_CONAN_PATH" ]; then
$NEW_CONAN_PATH --version
else
echo "ERROR: Could not install Conan to pyenv environment"
exit 1
fi
}
else
echo "ERROR: Conan not found in expected locations"
exit 1
fi
- name: Install Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Verify Rust installation
run: |
source $HOME/.cargo/env
rustc --version
cargo --version
- name: Set Conan Home Path
run: |
echo "=== Determining Conan executable path ==="
# Try to find conan in pyenv environment first
CONAN_PYENV_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null) || CONAN_PYENV_PATH=""
if [ -f "$CONAN_PYENV_PATH" ]; then
echo "Using Conan from pyenv environment: $CONAN_PYENV_PATH"
echo "CONAN_EXECUTABLE=$CONAN_PYENV_PATH" >> $GITHUB_ENV
CONAN_CMD="$CONAN_PYENV_PATH"
elif [ -f "/github/home/.local/bin/conan" ]; then
echo "Using Conan from user bin: /github/home/.local/bin/conan"
echo "CONAN_EXECUTABLE=/github/home/.local/bin/conan" >> $GITHUB_ENV
CONAN_CMD="/github/home/.local/bin/conan"
else
echo "ERROR: Conan executable not found"
exit 1
fi
echo "=== Setting Conan Home Path ==="
CONAN_HOME_OUTPUT=$($CONAN_CMD config home 2>&1) || {
echo "ERROR: Failed to get Conan home path with $CONAN_CMD"
echo "Conan output: $CONAN_HOME_OUTPUT"
echo "Last attempt - trying to import required modules..."
python3 -c "import six; import dateutil;"
exit 1
}
echo "Conan home path: $CONAN_HOME_OUTPUT"
echo "CONAN_HOME=$CONAN_HOME_OUTPUT" >> $GITHUB_ENV
- name: Add ASWF Conan remote
# Required so conan/profiles/common [replace_requires] can resolve
# openssl/*@openrv/vfx2024 from the ASWF JFrog Artifactory.
# Anonymous read; no credentials needed for install. Uses aswftesting
# (aswf-conan-dev) for now; swap to the 'aswf' production remote
# once binaries are promoted there.
# Rocky 8 currently has a prebuilt binary; other profiles will
# build from source via the CCI recipe exported under this user/channel.
run: |
$CONAN_EXECUTABLE remote remove aswftesting 2>/dev/null || true
$CONAN_EXECUTABLE remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0
- name: Export OpenRVCore recipe to Conan's cache
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
export QT_HOME=/__w/OpenRV/OpenRV/deps/Qt/${{ matrix.qt-version}}/gcc_64
echo "QT_HOME=$QT_HOME" >> $GITHUB_ENV
$CONAN_EXECUTABLE export openrvcore-conanfile.py
- name: Build OpenRV dependencies
# openexr (and every other dep covered by [replace_requires] in
# conan/profiles/common) now resolves to @openrv/vfx2024 and is
# pulled prebuilt from the ASWF remote on Rocky 8, built on the
# matching toolchain. The earlier Rocky 8-specific `--build=openexr/*`
# workaround is no longer needed.
run: |
# Rocky 8: force local rebuild of select packages whose Conan Center
# prebuilts target a newer glibc / libstdc++ than Rocky 8 provides.
# - openexr: prebuilt links against a newer libstdc++.so.6 the Rocky 8
# system lib (GCC 8) cannot satisfy; forcing local build picks up
# gcc-toolset-11's libstdc++_nonshared.a (no dynamic VERNEED on
# GLIBCXX_3.4.26+).
# - b2: prebuilt requires GLIBC_2.32+ and won't run on Rocky 8 (glibc 2.28),
# which fails boost's build step before the toolchain is even invoked.
# TODO: drop these workarounds once we're consuming Conan packages from
# the ASWF Conan registry (or a GitHub-cached Conan store) built on a
# Rocky 8 / VFX Reference Platform compatible base.
BUILD_FLAGS="--build=missing"
if [ "${{ matrix.rocky-version }}" = "8" ]; then
BUILD_FLAGS="--build=missing --build=openexr/* --build=b2/*"
fi
$CONAN_EXECUTABLE install conanfile.py $BUILD_FLAGS -pr:a ./conan/profiles/x86_64_rocky8
- name: Build OpenRV main executable
run: |
$CONAN_EXECUTABLE build conanfile.py --build=missing -pr:a ./conan/profiles/${{ matrix.conan-profile }}
- name: Tests
run: |
ctest --test-dir build/Release -C ${{ matrix.build-type }} --extra-verbose
- name: Free some spaces for the install steps
run: |
rm -rf build/Release/RV_DEPS_*
rm -rf build/Release/_deps
- name: Install OpenRV
run: |
ls -al build
cmake --install build/Release --prefix $(pwd)/_install --config ${{ matrix.build-type }}
macos:
#if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }}
name: '${{ matrix.os }} ${{ matrix.arch-type }} ${{ matrix.vfx-platform }}
<qt=${{ matrix.qt-version }},
python=${{ matrix.python-version }},
arch=${{ matrix.arch-type }},
config=${{ matrix.build-type }}>'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# VFX2024
#- os: "macos-13"
#arch-type: "x86_64"
#build-type: "Release"
#qt-version: "6.5.3"
#qt-version-short: "6.5"
#python-version: "3.11"
#cmake-version: "3.31.6"
#vfx-platform: "CY2024"
- os: "macos-14"
arch-type: "arm64"
build-type: "Release"
qt-version: "6.5.3"
qt-version-short: "6.5"
python-version: "3.11"
cmake-version: "3.31.6"
vfx-platform: "CY2024"
steps:
- name: Check if it is a schedule job
if: github.event_name == 'schedule'
run: |
echo "SKIP_DEPS_CACHE='true'" >> $GITHUB_ENV
- name: Display disk space
run: |
df -h /
- name: Clear up some spaces on disk
run: |
# Remove some unused XCode (Default is XCode 15.4).
sudo rm -rf /Applications/Xcode_15.3.app
sudo rm -rf /Applications/Xcode_15.2.app
sudo rm -rf /Applications/Xcode_15.1.app
sudo rm -rf /Applications/Xcode_15.0.1.app
sudo rm -rf /Users/runner/Library/Android
- name: Display disk space
run: |
df -h /
- name: Check out repository code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
submodules: recursive
- name: Add repository as safe directory
run: |
git config --global --add safe.directory /__w/OpenRV/OpenRV
- name: Install cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2
with:
cmake-version: "${{ matrix.cmake-version }}"
- name: Prepare Qt folder
run: |
mkdir -p "${{ github.workspace }}/deps"
- name: Install Qt ${{ matrix.qt-version }}
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
host: 'mac'
target: 'desktop'
# clang_64 contains both x86_64 and arm64 for Qt 6.
arch: 'clang_64'
dir: "${{ github.workspace }}/deps"
install-deps: 'false'
modules: ${{ env.MACOX_X86_64_QT6_MODULES }}
archives: ${{ env.MACOX_X86_64_QT6_ARCHIVES }}
# Caching only save 2 minutes. Keep the cache for longer operations.
cache: false
setup-python: true
tools: 'tools_qtcreator'
set-env: 'true'
tools-only: 'false'
aqtversion: '==3.2.*'
- name: Activate Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 5.2.0
with:
python-version: '${{ matrix.python-version }}'
- name: Install Python dependencies
run: |
python3 -m pip install --user --upgrade -r requirements.txt
python3 -m pip install --user conan
- name: Install Homebrew dependencies
# icu4c is needed for Qt UIC executable / AUTOUIC.
# Might be to find another way to install icu4c if the icu4c recipe disappear.
run: |
retry_count=0
max_retries=5
until [ $retry_count -ge $max_retries ]; do
echo "Attempt $((retry_count + 1)) of $max_retries"
if brew install --formula cmake ninja readline sqlite3 xz zlib tcl-tk@8 python-tk autoconf automake libtool python yasm clang-format black meson nasm pkg-config glew && \
brew install --formula icu4c; then
echo "Homebrew dependencies installed successfully"
break
else
retry_count=$((retry_count + 1))
if [ $retry_count -lt $max_retries ]; then
echo "Attempt $retry_count failed. Retrying in 5 seconds..."
sleep 5
fi
fi
done
if [ $retry_count -ge $max_retries ]; then
echo "Failed to install Homebrew dependencies after $max_retries attempts"
exit 1
fi
- name: Set QT_HOME
run: |
echo "QT_HOME=${{ github.workspace }}/deps/Qt/${{ matrix.qt-version }}/macos" >> $GITHUB_ENV
- name: Set Conan Home Path
run: echo "CONAN_HOME=$(/Users/runner/Library/Python/3.11/bin/conan config home)" >> $GITHUB_ENV
- name: Add ASWF Conan remote
# See conan.yml Rocky step of the same name for rationale.
run: |
/Users/runner/Library/Python/3.11/bin/conan remote remove aswftesting 2>/dev/null || true
/Users/runner/Library/Python/3.11/bin/conan remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0
- name: Export OpenRVCore recipe
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
/Users/runner/Library/Python/3.11/bin/conan export openrvcore-conanfile.py
- name: Build OpenRV dependencies
run: |
/Users/runner/Library/Python/3.11/bin/conan install conanfile.py --build=missing -pr:a ./conan/profiles/arm64_apple_release
- name: Build OpenRV main executable
run: |
/Users/runner/Library/Python/3.11/bin/conan build conanfile.py --build=missing -pr:a ./conan/profiles/arm64_apple_release
- name: Tests
run: |
ctest --test-dir build/Release -C ${{ matrix.build-type }} --extra-verbose
- name: Free some spaces for the install steps
run: |
rm -rf build/Release/RV_DEPS_*
rm -rf build/Release/_deps
- name: Install OpenRV
run: |
ls -al build
cmake --install build/Release --prefix $(pwd)/_install --config ${{ matrix.build-type }}
windows:
#if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }}
name: 'Windows ${{ matrix.vfx-platform }}
<${{ matrix.os }}
msvc=${{ matrix.msvc-component }},
qt=${{ matrix.qt-version }},
python=${{ matrix.python-version }},
cmake=${{ matrix.cmake-version }},
arch=${{ matrix.arch-type }},
config=${{ matrix.build-type }}>'
env:
MSYS2_ENV_CONV_EXCL: "INCLUDE;LIB;LIBPATH"
strategy:
fail-fast: false
matrix:
include:
# VFX2024
- os: "windows-2022"
arch-type: "x86_64"
build-type: "Release"
qt-version: "6.5.3"
python-version: "3.11"
cmake-version: "3.31.6"
vfx-platform: "CY2024"
msvc-component: "14.40.17.10.x86.x64"
msvc-compiler: "14.40.33807"
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
submodules: recursive
- name: Install MSVC components ${{ matrix.msvc-component }}
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.${{ matrix.msvc-component }}"
"Microsoft.VisualStudio.Component.VC.${{ matrix.msvc-component }}.Spectre"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- name: Set up MSVC ${{ matrix.msvc-compiler }}
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: ${{ matrix.msvc-compiler }}
arch: '${{ matrix.arch-type }}'
- name: Setup msys2 and install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
# False because it keep creating new cache entry.
cache: false
install: >-
mingw-w64-x86_64-autotools
mingw-w64-x86_64-cmake
mingw-w64-x86_64-cmake-cmcldeps
mingw-w64-x86_64-glew
mingw-w64-x86_64-libarchive
mingw-w64-x86_64-make
mingw-w64-x86_64-meson
mingw-w64-x86_64-toolchain
autoconf
automake
bison
flex
git
libtool
nasm
p7zip
patch
unzip
zip
- name: Activate Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 5.2.0
with:
python-version: '${{ matrix.python-version }}'
- name: Display Python installation location
run: |
python -c "import sys; print(sys.executable)"
$pythonDir = python -c "import sys, os; print(os.path.dirname(sys.executable))"
echo "WIN_PYTHON_DIR=$pythonDir" >> $env:GITHUB_ENV
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e
with:
toolchain: stable
- name: Cache CMake for Windows
uses: actions/cache@v4
id: windows-cmake-cache
with:
path: "C:/Program Files/CMake"
key: ${{ runner.os }}-cmake-${{ matrix.cmake-version }}
- name: Install CMake ${{ matrix.cmake-version }} with chocolatey
if: steps.windows-cmake-cache.outputs.cache-hit != 'true'
run: |
choco install cmake --version=${{ matrix.cmake-version }} --allow-downgrade
- name: Install JOM (parallel nmake)
run: choco install jom --yes
shell: powershell
- name: Set PATH environment variable
run: |
CMAKE_BIN=$(cygpath -u "C:/Program Files/CMake/bin")
WIN_PYTHON_DIR=$(cygpath -u "$WIN_PYTHON_DIR")
echo "export PATH=\"$CMAKE_BIN:$WIN_PYTHON_DIR:/c/msys64/mingw64/bin:\$PATH:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/Chocolatey/bin:/c/ProgramData/Chocolatey/lib/jom/tools\"" >> ~/.bash_profile
echo "export WIN_PYTHON_DIR=\"$WIN_PYTHON_DIR\"" >> ~/.bash_profile
shell: msys2 {0}
- name: Set ACLOCAL_PATH environment variable
run: |
echo "export ACLOCAL_PATH=/c/msys64/usr/share/aclocal" >> ~/.bash_profile
shell: msys2 {0}
- name: Add MSVC compiler to PATH for msys2
run: |
if [ -n "$VCToolsInstallDir" ]; then
MSVC_BIN=$(cygpath -u "$VCToolsInstallDir/bin/Hostx64/x64")
echo "export PATH=\"$MSVC_BIN:\$PATH\"" >> ~/.bash_profile
echo "Added MSVC bin to PATH: $MSVC_BIN"
else
echo "WARNING: VCToolsInstallDir not set, cl.exe will not be on PATH"
fi
shell: msys2 {0}
- name: Add Rust to PATH for msys2
run: |
echo "export PATH=\"/c/Users/runneradmin/.cargo/bin:\$PATH\"" >> ~/.bash_profile
shell: msys2 {0}
- name: Display environment variables
run: |
echo $PATH
echo $ACLOCAL_PATH
which python
which python3
which cmake
shell: msys2 {0}
- name: Prepare Qt folder
run: |
mkdir -p /c/qt
shell: msys2 {0}
- name: Install Qt ${{ matrix.qt-version }}
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
dir: "c:/"
install-deps: 'false'
modules: ${{ env.WINDOWS_QT6_MODULES }}
archives: ${{ env.WINDOWS_QT6_ARCHIVES }}
# Caching only save 2 minutes. Keep the cache for longer operations.
cache: false
setup-python: 'false'
tools: 'tools_qtcreator'
set-env: 'true'
tools-only: 'false'
aqtversion: '==3.2.*'
- name: Install Python dependencies
run: |
python3 -m pip install --user --upgrade -r ./requirements.txt
python3 -m pip install --user conan
PYTHON_SCRIPTS_DIR=$(python3 -c "import site, os; scripts = site.getusersitepackages(); print(os.path.join(os.path.dirname(scripts), 'Scripts'))")
echo "Python user Scripts dir: $PYTHON_SCRIPTS_DIR"
PYTHON_SCRIPTS_MSYS=$(cygpath -u "$PYTHON_SCRIPTS_DIR")
echo "export PATH=\"\$PATH:$PYTHON_SCRIPTS_MSYS\"" >> ~/.bash_profile
ls -al "$PYTHON_SCRIPTS_MSYS" || echo "WARNING: Scripts dir not found at $PYTHON_SCRIPTS_MSYS"
shell: msys2 {0}
- name: Set Conan Home Path
run: |
echo "$PATH"
cat ~/.bash_profile
conan --version
CONAN_HOME_PATH=$(conan config home)
echo "export CONAN_HOME=\"$CONAN_HOME_PATH\"" >> ~/.bash_profile
echo "CONAN_HOME=\"$CONAN_HOME_PATH\"" >> $GITHUB_ENV
shell: msys2 {0}
- name: Set QT_HOME
run: |
echo "export QT_HOME=c:/Qt/${{ matrix.qt-version }}/msvc2019_64" >> ~/.bash_profile
shell: msys2 {0}
- name: Setup PKG_CONFIG_PATH for Windows builds
run: |
# Set PKG_CONFIG_PATH to help FFmpeg find dependency .pc files
# Add common Conan pkg-config paths that will be created during builds
echo 'export PKG_CONFIG_PATH="$CONAN_HOME/p:$PKG_CONFIG_PATH"' >> ~/.bash_profile
echo 'export PKG_CONFIG_PATH="/c/users/runneradmin/.conan2/p:$PKG_CONFIG_PATH"' >> ~/.bash_profile
# Also try to set it for any build that might need it
echo 'export PKG_CONFIG_PATH="${PWD}:$PKG_CONFIG_PATH"' >> ~/.bash_profile
# Suppress MSYS2 warnings about /dev/shm and /dev/mqueue (harmless on Windows)
mkdir -p /tmp/dev 2>/dev/null || true
echo "PKG_CONFIG_PATH setup completed"
cat ~/.bash_profile | tail -5
shell: msys2 {0}
- name: Add ASWF Conan remote
# See conan.yml Rocky step of the same name for rationale.
run: |
source ~/.bash_profile
conan remote remove aswftesting 2>/dev/null || true
conan remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0
shell: msys2 {0}
- name: Export OpenRVCore recipe
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
conan export openrvcore-conanfile.py
shell: msys2 {0}
- name: Verify compiler and toolchain resolution
run: |
source ~/.bash_profile
echo "=== Toolchain diagnostics ==="
echo "PATH: $PATH"
echo "--- cmake ---"
which cmake && cmake --version || echo "WARNING: cmake not found"
echo "--- cl (MSVC compiler) ---"
command -v cl 2>/dev/null && cl 2>&1 | head -1 || echo "WARNING: cl.exe not found in PATH"
echo "--- MSVC env vars ---"
echo "VCINSTALLDIR=${VCINSTALLDIR:-<not set>}"
echo "VCToolsInstallDir=${VCToolsInstallDir:-<not set>}"
echo "INCLUDE=${INCLUDE:-<not set>}"
echo "LIB=${LIB:-<not set>}"
echo "=== End diagnostics ==="
shell: msys2 {0}
- name: Build and install OpenRV dependencies
run: |
source ~/.bash_profile
conan install conanfile.py --build=missing -pr:a ./conan/profiles/x86_64_windows -c tools.microsoft.bash:path=C:/msys64/usr/bin/bash.exe -c tools.microsoft.bash:subsystem=msys2
shell: msys2 {0}
- name: Build OpenRV main executable
run: |
conan build conanfile.py --build=missing -pr:a ./conan/profiles/x86_64_windows -c tools.microsoft.bash:path=C:/msys64/usr/bin/bash.exe -c tools.microsoft.bash:subsystem=msys2
shell: msys2 {0}
- name: Tests
continue-on-error: true
run: |
ls -al build
ls -al build/stage/app/bin
ctest --test-dir build -C ${{ matrix.build-type }} --extra-verbose
shell: msys2 {0}
- name: Install OpenRV
run: |
cmake --install build --prefix $(pwd)/_install --config ${{ matrix.build-type }}
shell: msys2 {0}