CI: add CI for ubuntu-20.04, add more encoder options #18
This file contains 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: C/C++ CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
build: [ubuntu-x64, ubuntu-20.04-x64, windows-x64, macos-x64, macos-arm64] | |
config: [Release] | |
include: | |
- build: ubuntu-x64 | |
os: ubuntu-latest | |
triplet: x64-linux-release | |
vcpkg-root: /usr/local/share/vcpkg | |
extra-args: "" | |
- build: ubuntu-20.04-x64 | |
os: ubuntu-20.04 | |
triplet: x64-linux-release | |
upload-path: /home/runner/.cache/vcpkg/archives | |
vcpkg-root: /usr/local/share/vcpkg | |
extra-args: "" | |
- build: windows-x64 | |
os: windows-latest | |
triplet: x64-win-llvm-static-release | |
vcpkg-root: C:\vcpkg | |
extra-args: --overlay-triplets=./triplets | |
- build: macos-x64 | |
os: macos-latest | |
triplet: x64-osx-release | |
vcpkg-root: /usr/local/share/vcpkg | |
extra-args: "" | |
- build: macos-arm64 | |
os: macos-latest | |
triplet: arm64-osx-release | |
vcpkg-root: /usr/local/share/vcpkg | |
extra-args: "" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up build environment (macos-latest) | |
run: | | |
brew install nasm | |
if: matrix.os == 'macos-latest' | |
- name: Set up build environment (ubuntu-latest) | |
run: | | |
sudo apt -y install nasm | |
if: matrix.os == 'ubuntu-latest' | |
- name: Set up build environment (ubuntu-20.04) | |
run: | | |
sudo apt -y install nasm | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Patch vcpkg | |
run: | | |
(cd ${{ matrix.vcpkg-root }} && git fetch origin) | |
(cd ${{ matrix.vcpkg-root }} && git reset --hard) | |
(cd ${{ matrix.vcpkg-root }} && git checkout f6a5d4e8eb7476b8d7fc12a56dff300c1c986131) | |
(cd ${{ matrix.vcpkg-root }} && git apply --ignore-space-change --ignore-whitespace --3way ${{ github.workspace }}/ffmpeg.patch) | |
- name: Build ffmpeg | |
run: | | |
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.triplet }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ffmpeg-${{ matrix.build }} | |
path: ${{ matrix.vcpkg-root }}/packages/ffmpeg_${{ matrix.triplet }}/lib | |
if: ${{ always() }} |