-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (136 loc) · 5.52 KB
/
Copy pathbuild.yml
File metadata and controls
154 lines (136 loc) · 5.52 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Compile & Test
permissions:
actions: write
contents: read
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
features: [all-on, all-off]
name: linux-${{ matrix.compiler }}-${{ matrix.features }}
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib:${{ github.workspace }}/build/thirdparty/buildmaster/install/lib
steps:
- name: Checkout repository and submodules
uses: stormbytepp/githubactions/.github/actions/checkout-cached@master
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
uses: stormbytepp/githubactions/.github/actions/install-cached@master
with:
packages: >-
libboost-dev
libboost-filesystem-dev
libconfig++-dev
libsqlite3-dev
ffmpeg
git
libjsoncpp-dev
cache-key: apt-media-deps
- name: Build with toolchain
uses: stormbytepp/githubactions/.github/actions/build-with-toolchain@master
with:
toolchain: ${{ matrix.compiler }}
ccache-key: v1-${{ matrix.compiler }}-${{ matrix.features }}
build-type: ${{ env.BUILD_TYPE }}
configure-options: >-
${{ matrix.features == 'all-on' &&
'-DENABLE_HEVC=ON -DENABLE_AAC=ON -DENABLE_FDKAAC=ON -DENABLE_AC3=ON -DENABLE_EAC3=ON -DENABLE_OPUS=ON' ||
'-DENABLE_HEVC=OFF -DENABLE_AAC=OFF -DENABLE_FDKAAC=OFF -DENABLE_AC3=OFF -DENABLE_EAC3=OFF -DENABLE_OPUS=OFF' }}
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
compiler: [clang]
features: [all-on, all-off]
name: macos-${{ matrix.compiler == 'clang' && 'clang-libc++' || matrix.compiler }}-${{ matrix.features }}
env:
DYLD_LIBRARY_PATH: ${{ github.workspace }}/build/lib:${{ github.workspace }}/build/thirdparty/buildmaster/install/lib
steps:
- name: Checkout repository and submodules
uses: stormbytepp/githubactions/.github/actions/checkout-cached@master
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
shell: bash
run: |
set -euo pipefail
brew install boost libconfig sqlite ffmpeg jsoncpp
# Compatibilidad con el #include <jsoncpp/json/json.h> del código antiguo
mkdir -p "$(brew --prefix)/include/jsoncpp"
ln -sf ../json "$(brew --prefix)/include/jsoncpp/json"
- name: Export Homebrew paths
id: brew
shell: bash
run: |
BREW_PREFIX=$(brew --prefix)
echo "prefix=${BREW_PREFIX}" >> $GITHUB_OUTPUT
echo "CMAKE_PREFIX_PATH=${BREW_PREFIX}" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=${BREW_PREFIX}/lib/pkgconfig:${BREW_PREFIX}/share/pkgconfig" >> $GITHUB_ENV
echo "LDFLAGS=-L${BREW_PREFIX}/lib" >> $GITHUB_ENV
- name: Build with toolchain
uses: stormbytepp/githubactions/.github/actions/build-with-toolchain@master
with:
toolchain: ${{ matrix.compiler }}
ccache-key: v1-${{ matrix.compiler }}-${{ matrix.features }}
build-type: ${{ env.BUILD_TYPE }}
configure-options: >-
-DCMAKE_PREFIX_PATH=${{ steps.brew.outputs.prefix }}
-DCMAKE_CXX_FLAGS=-I${{ steps.brew.outputs.prefix }}/include
-DCMAKE_EXE_LINKER_FLAGS=-L${{ steps.brew.outputs.prefix }}/lib
-DCMAKE_SHARED_LINKER_FLAGS=-L${{ steps.brew.outputs.prefix }}/lib
${{ matrix.features == 'all-on' &&
'-DENABLE_HEVC=ON -DENABLE_AAC=ON -DENABLE_FDKAAC=ON -DENABLE_AC3=ON -DENABLE_EAC3=ON -DENABLE_OPUS=ON' ||
'-DENABLE_HEVC=OFF -DENABLE_AAC=OFF -DENABLE_FDKAAC=OFF -DENABLE_AC3=OFF -DENABLE_EAC3=OFF -DENABLE_OPUS=OFF' }}
# build-windows:
# runs-on: windows-latest
# strategy:
# fail-fast: false
# matrix:
# features: [all-on, all-off]
#
# name: windows-msvc-${{ matrix.features }}
#
# steps:
# - name: Checkout repository and submodules
# uses: stormbytepp/githubactions/.github/actions/checkout-cached@master
# with:
# fetch-depth: 0
# submodules: recursive
#
# - name: Install dependencies
# shell: pwsh
# run: |
# choco install ffmpeg sqlite -y
# # Boost / libconfig++ / jsoncpp normalmente se resuelven vía vcpkg o se bundlean.
#
# - name: Add DLL directories to PATH
# shell: pwsh
# run: |
# echo "${{ github.workspace }}\build\lib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# echo "${{ github.workspace }}\build\thirdparty\buildmaster\install\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
#
# - name: Build with toolchain
# uses: stormbytepp/githubactions/.github/actions/build-with-toolchain@master
# with:
# toolchain: msvc
# ccache-key: v1-msvc-${{ matrix.features }}
# build-type: ${{ env.BUILD_TYPE }}
# configure-options: >-
# ${{ matrix.features == 'all-on' &&
# '-DENABLE_HEVC=ON -DENABLE_AAC=ON -DENABLE_FDKAAC=ON -DENABLE_AC3=ON -DENABLE_EAC3=ON -DENABLE_OPUS=ON' ||
# '-DENABLE_HEVC=OFF -DENABLE_AAC=OFF -DENABLE_FDKAAC=OFF -DENABLE_AC3=OFF -DENABLE_EAC3=OFF -DENABLE_OPUS=OFF' }}