- use environment variables

- on ubuntu 18 gcc7, use ffmpeg 3.2.18
This commit is contained in:
pf 2023-03-28 20:52:49 +01:00
parent bcd25e807f
commit a6938333d5

View File

@ -16,6 +16,14 @@ defaults:
jobs:
ubuntu-latest-gcc-default-cmake-3-8-ffmpeg5:
runs-on: 'ubuntu-latest'
env:
ffmpeg_tar: n5.1.3.tar.gz
ffmpeg_url: https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.1.3.tar.gz
ffmpeg_src: FFmpeg-n5.1.3
ffmpeg_install: /home/runner/ffmpeg-n5.1.3_installation
ffmpeg_key: ffmpeg-n5.1.3_try4
steps:
- uses: actions/checkout@v2
@ -42,16 +50,16 @@ jobs:
uses: actions/cache@v3
id: cache-ffmpeg5
with:
path: /home/runner/ffmpeg-n5.1.3_installation
key: ffmpeg-n5.1.3_try4
path: $ffmpeg_install
key: $ffmpeg_key
- name: Build FFmpeg 5
if: steps.cache-ffmpeg5.outputs.cache-hit != 'true'
run: |
wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.1.3.tar.gz
tar -xf n5.1.3.tar.gz
cd FFmpeg-n5.1.3
./configure --prefix=/home/runner/ffmpeg-n5.1.3_installation --disable-doc --disable-programs
wget $ffmpeg_url
tar -xf $ffmpeg_tar
cd $ffmpeg_src
./configure --prefix=$ffmpeg_install --disable-doc --disable-programs
make -j4
make install
cd ..
@ -60,7 +68,7 @@ jobs:
run: |
mkdir build
cd build
~/cmake-3.8.0-Linux-x86_64/bin/cmake -DCMAKE_PREFIX_PATH=/home/runner/ffmpeg-n5.1.3_installation ..
~/cmake-3.8.0-Linux-x86_64/bin/cmake -DCMAKE_PREFIX_PATH=$ffmpeg_install ..
- name: Build just tests
run: |
@ -107,27 +115,56 @@ jobs:
ubuntu-18_04-gcc-7:
runs-on: 'ubuntu-18.04'
env:
ffmpeg_tar: n3.2.18.tar.gz
ffmpeg_url: https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n3.2.18.tar.gz
ffmpeg_src: FFmpeg-n3.2.18
ffmpeg_install: /home/runner/ffmpeg-n3.2.18_installation
ffmpeg_key: ffmpeg-n3.2.18_try1
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install libwebp-dev libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libswresample-dev libswscale-dev libavutil-dev
- name: Install gcc 7
sudo apt install gcc-7 g++-7 make libwebp-dev
- name: Cache FFmpeg 3.2
uses: actions/cache@v3
id: cache-ffmpeg3.2
with:
path: $ffmpeg_install
key: $ffmpeg_key
- name: Build FFmpeg 3.2
if: steps.cache-ffmpeg3.2.outputs.cache-hit != 'true'
run: |
sudo apt install gcc-7 g++-7
wget $ffmpeg_url
tar -xf $ffmpeg_tar
cd $ffmpeg_src
./configure --prefix=$ffmpeg_install --disable-doc --disable-programs
make -j4
make install
cd ..
- name: Configure
run: cmake ${{ github.workspace }}/dlib/test -B build
run: cmake ${{ github.workspace }}/dlib/test -B build -DCMAKE_PREFIX_PATH=$ffmpeg_install
- name: Build just tests
run: cmake --build build --config Release --target dtest --parallel 4
- name: Test
run: build/dtest --runall -q
- name: Build examples, etc
run: cmake --build build --config Release --parallel 2
# Test cmake scrips can build standalone dlib as a shared library
- name: Configure dlib as shared library
run: cmake ${{ github.workspace }}/dlib -B build_dlib_shared -DBUILD_SHARED_LIBS=1
run: cmake ${{ github.workspace }}/dlib -B build_dlib_shared -DBUILD_SHARED_LIBS=1 -DCMAKE_PREFIX_PATH=$ffmpeg_install
- name: Build dlib as shared library
run: cmake --build build_dlib_shared --parallel 4