-
-
Notifications
You must be signed in to change notification settings - Fork 19
60 lines (58 loc) · 2.17 KB
/
cmake-multi-platform.yml
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
name: CI build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master", "testing" ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows MSVC 64 Bit",
os: windows-2022,
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
generators: "Visual Studio 17 2022",
msvc_arch: x64
}
- {
name: "Ubuntu Latest",
os: ubuntu-latest,
c_compiler: gcc,
cpp_compiler: g++,
}
- {
name: "Ubuntu Latest (Clang)",
os: ubuntu-latest,
c_compiler: clang,
cpp_compiler: clang++,
}
- {
name: "Mac OS Latest arm64",
os: macos-latest,
c_compiler: clang,
cpp_compiler: clang++,
osx_arch: arm64
}
env:
CMAKE_GENERATOR: "${{ matrix.config.generators }}"
steps:
- uses: actions/checkout@v4
- uses: ilammy/setup-nasm@v1
- run: git fetch --prune --unshallow
- name: Ubuntu/Mac OS X
if: ${{ !contains( matrix.config.generators, 'Visual Studio' ) }}
run: |
cmake --fresh -B Build -DCMAKE_BUILD_TYPE=Release "-DCMAKE_CXX_COMPILER=${{ matrix.config.cpp_compiler }}" "-DCMAKE_C_COMPILER=${{ matrix.config.c_compiler }}" -DNATIVE=ON -DSVT_AV1_LTO=ON -DBUILD_APPS=ON -DBUILD_DEC=OFF -DREPRODUCIBLE_BUILDS=ON "-DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.osx_arch }}"
cmake --build Build --config Release --parallel $(getconf _NPROCESSORS_ONLN 2> /dev/null || nproc 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null)
shell: bash
- name: MSVC build
if: contains( matrix.config.generators, 'Visual Studio' )
run: |
cmake -B Build -A "${{ matrix.config.msvc_arch }}" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_APPS=ON -DBUILD_DEC=OFF -DREPRODUCIBLE_BUILDS=ON
cmake --build Build --config Release
shell: cmd