feat: SVG input (#75) #271
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| branches-ignore: | |
| - 'ga-ignore-**' | |
| push: | |
| branches-ignore: | |
| - 'ga-ignore-**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up VCPKG_ROOT | |
| run: echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y build-essential cmake python3-dev ffmpeg libopencv-dev libcurl4-openssl-dev libvulkan-dev libfreetype6-dev glslang-dev glslang-tools g++-13 gcc-13 | |
| - name: Install pybind11 | |
| run: pip install pybind11 | |
| - name: Set CXX environment variable | |
| run: | | |
| g++-13 --version | |
| g++ --version | |
| echo "CXX=$(which g++-13)" >> $GITHUB_ENV | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '6.2.4' | |
| host: 'linux' | |
| target: 'desktop' | |
| arch: 'gcc_64' | |
| - name: Configure CMake | |
| run: cmake -S . -B build -DCMAKE_CXX_COMPILER=$(which g++-13) -DCI_BUILD=ON | |
| - name: Build the project | |
| run: make -C build | |
| - name: copy executable | |
| run: cp build/video-code video-code | |
| - name: Run video-code | |
| run: | | |
| ./video-code --generate out.mp4 | |
| if [ $? -ne 0 ] || [ ! -f "out.mp4" ]; then | |
| echo "Error: video-code failed to generate out.mp4." | |
| exit 1 | |
| fi | |
| mkdir -p video | |
| mv out.mp4 video/video_result.mp4 | |
| # - name: Run functional tests | |
| # run: | | |
| # ./tests/functional_tests.sh | |
| # if [ $? -ne 0 ]; then | |
| # echo "Error: Functional tests failed." | |
| # exit 1 | |
| build-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 180 | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| # MINGW64 (GCC 13+) matches the GNU-style flags (-Wall -Wextra -pipe ...) | |
| # and the `CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13` check in | |
| # CMakeLists.txt — an MSVC/clang-cl toolchain would need those flags | |
| # translated separately. | |
| - name: Set up MSYS2 (MinGW64) | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-toolchain | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-ninja | |
| mingw-w64-x86_64-python | |
| mingw-w64-x86_64-python-pip | |
| - name: Install pybind11 | |
| run: python -m pip install pybind11 | |
| # vcpkg builds OpenCV/Qt/FFmpeg/etc. from source for x64-mingw-dynamic — | |
| # very slow on a cold cache. Cache via GitHub Actions so repeat runs reuse | |
| # built packages (see https://learn.microsoft.com/vcpkg/users/binarycaching). | |
| - name: Export GitHub Actions cache environment variables (vcpkg binary cache) | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| # CMakeLists.txt sets CMAKE_TOOLCHAIN_FILE *after* project(), which is too | |
| # late for vcpkg to hook in (must be passed on the command line, same as | |
| # the local Makefile's VCPKG_FLAGS). | |
| - name: Configure CMake | |
| env: | |
| VCPKG_ROOT: C:/vcpkg | |
| VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
| run: cmake -S . -B build -G Ninja -DCI_BUILD=ON -DVCPKG_TARGET_TRIPLET=x64-mingw-dynamic -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
| - name: Build the project | |
| env: | |
| VCPKG_ROOT: C:/vcpkg | |
| VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
| run: cmake --build build |