mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
- use environment variables
- on ubuntu 18 gcc7, use ffmpeg 3.2.18
This commit is contained in:
parent
bcd25e807f
commit
a6938333d5
61
.github/workflows/build_cpp.yml
vendored
61
.github/workflows/build_cpp.yml
vendored
@ -16,6 +16,14 @@ defaults:
|
|||||||
jobs:
|
jobs:
|
||||||
ubuntu-latest-gcc-default-cmake-3-8-ffmpeg5:
|
ubuntu-latest-gcc-default-cmake-3-8-ffmpeg5:
|
||||||
runs-on: 'ubuntu-latest'
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -42,16 +50,16 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-ffmpeg5
|
id: cache-ffmpeg5
|
||||||
with:
|
with:
|
||||||
path: /home/runner/ffmpeg-n5.1.3_installation
|
path: $ffmpeg_install
|
||||||
key: ffmpeg-n5.1.3_try4
|
key: $ffmpeg_key
|
||||||
|
|
||||||
- name: Build FFmpeg 5
|
- name: Build FFmpeg 5
|
||||||
if: steps.cache-ffmpeg5.outputs.cache-hit != 'true'
|
if: steps.cache-ffmpeg5.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.1.3.tar.gz
|
wget $ffmpeg_url
|
||||||
tar -xf n5.1.3.tar.gz
|
tar -xf $ffmpeg_tar
|
||||||
cd FFmpeg-n5.1.3
|
cd $ffmpeg_src
|
||||||
./configure --prefix=/home/runner/ffmpeg-n5.1.3_installation --disable-doc --disable-programs
|
./configure --prefix=$ffmpeg_install --disable-doc --disable-programs
|
||||||
make -j4
|
make -j4
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
@ -60,7 +68,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd 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
|
- name: Build just tests
|
||||||
run: |
|
run: |
|
||||||
@ -107,27 +115,56 @@ jobs:
|
|||||||
|
|
||||||
ubuntu-18_04-gcc-7:
|
ubuntu-18_04-gcc-7:
|
||||||
runs-on: 'ubuntu-18.04'
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libwebp-dev libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libswresample-dev libswscale-dev libavutil-dev
|
sudo apt install gcc-7 g++-7 make libwebp-dev
|
||||||
- name: Install gcc 7
|
|
||||||
|
- 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: |
|
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
|
- 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
|
- name: Build just tests
|
||||||
run: cmake --build build --config Release --target dtest --parallel 4
|
run: cmake --build build --config Release --target dtest --parallel 4
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: build/dtest --runall -q
|
run: build/dtest --runall -q
|
||||||
|
|
||||||
- name: Build examples, etc
|
- name: Build examples, etc
|
||||||
run: cmake --build build --config Release --parallel 2
|
run: cmake --build build --config Release --parallel 2
|
||||||
|
|
||||||
# Test cmake scrips can build standalone dlib as a shared library
|
# Test cmake scrips can build standalone dlib as a shared library
|
||||||
- name: Configure dlib as 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
|
- name: Build dlib as shared library
|
||||||
run: cmake --build build_dlib_shared --parallel 4
|
run: cmake --build build_dlib_shared --parallel 4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user