Skip to content

ci: fix release workflow failures on all platforms #6

ci: fix release workflow failures on all platforms

ci: fix release workflow failures on all platforms #6

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
# ---------- Linux ----------
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config \
libavformat-dev libavcodec-dev libavutil-dev \
libswresample-dev libswscale-dev libavfilter-dev \
libsdl2-dev libgtk-3-dev
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build build -j$(nproc)
- name: Run unit tests
run: cd build && ctest --output-on-failure
# ---------- macOS ----------
build-macos:
runs-on: macos-latest
strategy:
matrix:
build_type: [Release]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install cmake ffmpeg sdl2 pkg-config
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build build -j$(sysctl -n hw.logicalcpu)
- name: Run unit tests
run: cd build && ctest --output-on-failure
# ---------- Windows ----------
build-windows:
runs-on: windows-latest
strategy:
matrix:
build_type: [Release]
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '23dc124705fcac41cf35c33dd9541f5094a9c19f'
- name: Install dependencies via vcpkg
run: vcpkg install "ffmpeg[core,avformat,avcodec,swresample,swscale,avfilter]:x64-windows" "sdl2:x64-windows"
- name: Configure
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Run unit tests
run: cd build && ctest -C ${{ matrix.build_type }} --output-on-failure