mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 20:40:27 +00:00
178 lines
8.0 KiB
YAML
178 lines
8.0 KiB
YAML
name: C/C++ CI
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.github/workflows/ccpp.yml'
|
|
- '**.c'
|
|
- '**.cpp'
|
|
- '**.cu'
|
|
- '**.h'
|
|
- '**.hpp'
|
|
- '**.m'
|
|
- '**.mm'
|
|
- 'autogen.sh'
|
|
- 'configure.ac'
|
|
- 'Makefile.in'
|
|
|
|
jobs:
|
|
Ubuntu:
|
|
name: run Ubuntu
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CPATH: "/usr/local/qt/include"
|
|
LIBRARY_PATH: "/usr/local/qt/lib"
|
|
PKG_CONFIG_PATH: "/usr/local/qt/lib/pkgconfig"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: set-path
|
|
run: echo "::add-path::/usr/local/qt/bin"
|
|
- name: bootstrap
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install libcppunit-dev nvidia-cuda-toolkit
|
|
sudo apt install libglew-dev freeglut3-dev libgl1-mesa-dev
|
|
sudo apt install libx11-dev
|
|
sudo apt install libsdl2-dev
|
|
sudo apt install libssl-dev
|
|
sudo apt install portaudio19-dev libjack-jackd2-dev libasound-dev libv4l-dev
|
|
sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
|
|
sudo apt install libopencv-dev
|
|
sudo apt install libglib2.0-dev libcurl4-nss-dev
|
|
( mkdir gpujpeg/build && cd gpujpeg/build && CC=gcc-6 CXX=g++-6 cmake .. && make && sudo make install && sudo ldconfig )
|
|
( sudo apt install uuid-dev && cd cineform-sdk/ && cmake . && make CFHDCodecStatic )
|
|
sudo chmod 777 /usr/local
|
|
- name: Cache static Qt
|
|
id: cache-qt-linux
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: /usr/local/qt
|
|
key: cache-qt-linux
|
|
- name: Build static Qt
|
|
if: steps.cache-qt-linux.outputs.cache-hit != 'true'
|
|
run: |
|
|
wget --no-verbose https://download.qt.io/archive/qt/5.13/5.13.2/single/qt-everywhere-src-5.13.2.tar.xz -O /var/tmp/qt.tar.xz
|
|
cd /var/tmp && tar xJf qt.tar.xz && mv qt-everywhere-src-* qt
|
|
cd /var/tmp/qt && ./configure -static -release -nomake examples -opensource -confirm-license -opengl -prefix /usr/local/qt
|
|
make -j 3 -C /var/tmp/qt && sudo make -C /var/tmp/qt install
|
|
- name: configure
|
|
run: ./autogen.sh --enable-qt --enable-static-qt --with-cuda-host-compiler=gcc-6 --enable-plugins
|
|
- name: make
|
|
run: make
|
|
- name: make check
|
|
run: make check
|
|
- name: make distcheck
|
|
run: make distcheck
|
|
- name: AppImage
|
|
run: APPIMAGE=`data/scripts/Linux-AppImage/create-appimage.sh` && mkdir UltraGrid-CI-Linux && mv $APPIMAGE UltraGrid-CI-Linux
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI Linux build
|
|
path: UltraGrid-CI-Linux
|
|
|
|
macOS:
|
|
name: run macOS
|
|
runs-on: macos-latest
|
|
env:
|
|
UG_SKIP_NET_TESTS: 1
|
|
CPATH: "/usr/local/opt/qt/include"
|
|
LIBRARY_PATH: "/usr/local/opt/qt/lib"
|
|
PKG_CONFIG_PATH: "/usr/local/opt/qt/lib/pkgconfig"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: set-path
|
|
run: echo "::add-path::/usr/local/opt/qt/bin"
|
|
- name: bootstrap
|
|
run: |
|
|
brew install autoconf automake cppunit dylibbundler libtool pkg-config
|
|
brew install ffmpeg portaudio sdl2
|
|
brew install ossp-uuid # for cineform
|
|
( cd cineform-sdk/ && cmake . && make CFHDCodecStatic )
|
|
#brew install qt
|
|
- name: Cache static Qt
|
|
id: cache-qt-mac
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: /usr/local/opt/qt
|
|
key: cache-qt-mac
|
|
|
|
- name: Build static Qt
|
|
if: steps.cache-qt-mac.outputs.cache-hit != 'true'
|
|
run: |
|
|
wget --no-verbose https://download.qt.io/archive/qt/5.13/5.13.2/single/qt-everywhere-src-5.13.2.tar.xz
|
|
tar xJf qt-everywhere-src-5.13.2.tar.xz
|
|
cd qt-everywhere-src-5.13.2
|
|
./configure -static -release -nomake examples -opensource -confirm-license -opengl -prefix /usr/local/opt/qt
|
|
make -j 3 && sudo make install
|
|
|
|
- name: configure
|
|
run: export CPATH LIBRARY_PATH PKG_CONFIG_PATH && ./autogen.sh --enable-qt --enable-static-qt
|
|
- name: make
|
|
run: make osx-gui-dmg
|
|
- name: make check
|
|
run: make check
|
|
- name: make distcheck
|
|
run: make distcheck
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI macOS build
|
|
path: UltraGrid.dmg
|
|
|
|
Windows:
|
|
name: run Windows
|
|
runs-on: windows-latest
|
|
env:
|
|
MSYS2_PATH_TYPE: inherit # MSYS2 inherits PATH from Windows
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: Install MSYS2
|
|
run: choco install --no-progress msys2 --params "/NoUpdate /InstallDir:C:\msys64"
|
|
- name: Install CUDA
|
|
run: choco install --no-progress cuda
|
|
- name: MSYS2 set env
|
|
run: |
|
|
C:\msys64\usr\bin\bash -lc 'echo export PATH=/mingw64/bin:/usr/local/bin:\$PATH >> ~/.bash_profile'
|
|
C:\msys64\usr\bin\bash -lc 'echo export CPATH=/usr/local/include >> ~/.bash_profile'
|
|
C:\msys64\usr\bin\bash -lc 'echo export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/mingw64/lib/pkgconfig >> ~/.bash_profile'
|
|
C:\msys64\usr\bin\bash -lc 'echo export LIBRARY_PATH=/usr/local/lib >> ~/.bash_profile'
|
|
C:\msys64\usr\bin\bash -lc 'echo cd \`cygpath \$GITHUB_WORKSPACE\` >> ~/.bash_profile'
|
|
echo "::add-path::C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin"
|
|
echo "::add-path::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64" # cl
|
|
echo "::add-path::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
|
|
echo "::add-path::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
|
|
C:\msys64\usr\bin\bash -lc 'echo export CPATH=\$CPATH:/c/Program\\\ Files/NVIDIA\\\ GPU\\\ Computing\\\ Toolkit/CUDA/v10.2/include >> ~/.bash_profile'
|
|
- name: Install MSYS2 packages
|
|
run: C:\msys64\usr\bin\bash -lc 'pacman -Sy --noconfirm automake autoconf git make pkg-config mingw-w64-x86_64-toolchain mingw-w64-x86_64-cppunit unzip zip'
|
|
- name: Install FFMPEG
|
|
run: C:\msys64\usr\bin\bash -lc 'wget --no-verbose https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-latest-win64-dev.zip && wget --no-verbose https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.zip && unzip ffmpeg-latest-win64-dev.zip && unzip ffmpeg-latest-win64-shared.zip && mkdir -p /usr/local/lib /usr/local/bin /usr/local/include && cp -r ffmpeg-latest-win64-dev/include/* /usr/local/include && cp -r ffmpeg-latest-win64-dev/lib/* /usr/local/lib && cp -r ffmpeg-latest-win64-shared/bin/* /usr/local/bin && rm -rf ffmpeg-latest-*'
|
|
- name: Build GPUJPEG
|
|
run: C:\msys64\usr\bin\bash -lc 'cd gpujpeg && nvcc -I. -DGPUJPEG_EXPORTS -o gpujpeg.dll --shared src/gpujpeg_*c src/gpujpeg*cu && cp gpujpeg.lib /usr/local/lib && cp gpujpeg.dll /usr/local/bin && cp -r libgpujpeg /usr/local/include'
|
|
- name: Build CineForm
|
|
run: C:\msys64\usr\bin\bash -lc "cd cineform-sdk && cmake -DBUILD_STATIC=false -G Visual\ Studio\ 16\ 2019 -A x64 && MSBuild.exe CineFormSDK.sln -property:Configuration=Release && cp Release/CFHDCodec.dll /usr/local/bin && cp Release/CFHDCodec.lib /usr/local/lib && cp Common/* /usr/local/include && cp libcineformsdk.pc /usr/local/lib/pkgconfig"
|
|
- name: configure
|
|
run: C:\msys64\usr\bin\bash -lc "./autogen.sh"
|
|
- name: make
|
|
run: C:\msys64\usr\bin\bash -lc "make"
|
|
- name: make check
|
|
run: C:\msys64\usr\bin\bash -lc "make check"
|
|
- name: make dist-check
|
|
run: C:\msys64\usr\bin\bash -lc "make distcheck"
|
|
- name: add DLL depends
|
|
run: C:\msys64\usr\bin\bash -lc 'rm bin/run-tests.exe; for exe in bin/*exe; do for n in `data/scripts/get_dll_depends.sh "$exe"`; do cp "$n" bin; done; done; mv bin UltraGrid-CI-Win'
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI Windows build
|
|
path: UltraGrid-CI-Win
|