Updated CI #208
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: CMake | |
| 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, clang-libc++] | |
| 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' }} | |
| ${{ matrix.compiler == 'clang-libc++' && '-DCMAKE_CXX_FLAGS=-stdlib=libc++' || '' }} | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [gcc, 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 | |
| - 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-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. | |
| # Si tu CMake los busca en sistema, añade aquí lo que necesites. | |
| - 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' }} |