-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (69 loc) · 2.25 KB
/
ci.yml
File metadata and controls
87 lines (69 loc) · 2.25 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
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: 'c82f74667287d3dc386bce81e44964370c91a289'
- 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