dlib/.github/workflows/build_cpp.yml

241 lines
7.4 KiB
YAML
Raw Normal View History

name: C++
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
on:
push:
branches:
- master
paths:
- ".github/workflows/build_cpp.yml"
- "**.cpp"
- "**.h"
- "**.c"
- "**.cu"
- "**.cmake"
- "**CMakeLists.txt"
pull_request:
branches:
- master
paths:
- ".github/workflows/build_cpp.yml"
- "**.cpp"
- "**.h"
- "**.c"
- "**.cu"
- "**.cmake"
- "**CMakeLists.txt"
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
defaults:
run:
shell: bash
working-directory: dlib/test
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
jobs:
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
ubuntu-latest-gcc-default-cmake-3-8-ffmpeg5:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- name: Install dependencies
run: |
sudo apt update
sudo apt install libwebp-dev make yasm
- name: Cache cmake 3.8.0
uses: actions/cache@v3
id: cache-cmake-download
with:
# cache this folder:
path: ~/cmake-3.8.0-Linux-x86_64
key: cmake-3.8.0_try3
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- run: |
# Get the minimum version of cmake dlib supports
wget https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz
tar -xf cmake-3.8.0-Linux-x86_64.tar.gz -C ~
if: steps.cache-cmake-download.outputs.cache-hit != 'true'
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- name: Cache FFmpeg 5
uses: actions/cache@v3
id: cache-ffmpeg5
with:
path: /home/runner/ffmpeg-n5.1.3_installation
key: ffmpeg-n5.1.3_try4
- name: Build FFmpeg 5
if: steps.cache-ffmpeg5.outputs.cache-hit != 'true'
run: |
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
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
make -j4
make install
cd ..
- name: Configure
run: |
mkdir build
cd build
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
~/cmake-3.8.0-Linux-x86_64/bin/cmake -DCMAKE_PREFIX_PATH=/home/runner/ffmpeg-n5.1.3_installation ..
- name: Build just tests
run: |
cd build
make -j4 dtest
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- name: Test
run: build/dtest --runall -q
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- name: Build examples, etc
run: |
cd build
make -j2
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
ubuntu-latest-gcc-11-blas:
runs-on: 'ubuntu-latest'
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
steps:
- uses: actions/checkout@v2
2022-06-18 10:19:11 +08:00
- name: Install dependencies
run: |
sudo apt update
FFMPEG wrappers: dlib::ffmpeg::decoder and dlib::ffmpeg::demuxer (#2707) * - added ffmpeg stuff to cmake * - added observer_ptr * ffmpeg utils * WIP * - added ffmpeg_decoder * config file for test data * another test file * install ffmpeg * added ffmpeg_demuxer * install all ffmpeg libraries * support older version of ffmpeg * simplified loop * - test converting to dlib object - added docs - support older ffmpeg * added convert() overload * added comment * only register stuff when API not deprecated * - fixed version issues - fixed decoding * added tests for ffmpeg_demuxer * removed unused code * test GIF * added docs * added audio test * test for audio * more tests * review changes * don't need observer_ptr * made deps public. I could be wrong but just in case. * - added some static asserts. Some areas of the code might do memcpy's on arrays of pixels. This requires the structures to be packed. Check this. - added convert() functions - changed default decoder options. By default, always decode to RGB and S16 audio - added convenience constructor to demuxer * - no longer need opencv * oops. I let that slip * - made a few functions public - more precise requires clauses * enhanced example * - avoid FFMPEG_INITIALIZED being optimized away at link time - added decoding example * - avoid -Wunused-parameter error * constexpr and noexcept correctness. This probably makes no difference to performance, BUT, it's what the core guidelines tell you to do. It does however demonstrate how complicated and unecessarily verbose C++ is becoming. Sigh, maybe one day i'll make the switch to something that doesn't make my eyes twitch. * - simplified metadata structure * hopefully more educational * added another example * ditto * typo * screen grab example * whoops * avoid -Wunused-parameter errors * ditto * - added methods to av_dict - print the demuxer format options that were not used - enhanced webcam_face_pose_ex.cpp so you can set webcam options * if height and width are specified, attempt to set video_size in format_options. Otherwise set the bilinear resizer. * updated docs * once again, the ffmpeg APIs do a lot for you. It's a matter of knowing which APIs to call. * made header-only * - some Werror thing * don't use type_safe_union * - templated sample type - reverted deep copy of AVFrame for frame copy constructor * - added is_pixel_type and is_pixel_check * unit tests for pixel traits * enhanced is_image_type type trait and added is_image_check * added unit tests for is_image_type * added pix_traits, improved convert() functions * bug fix * get rid of -Werror=unused-variable error * added a type alias * that's the last of the manual memcpys gone. We'using ffmpeg API everywhere now for copying frames to buffers and back * missing doc * set framerate for webcam * list input devices * oops. I was trying to make ffmpeg 5 happy but i've given up on ffmpeg v5 compatibility in this PR. Future PR. * enhanced the information provided by list_input_devices and list_output_devices * removed vscode settings.json file * - added a type trait for checking whether a type is complete. This is useful for writing type traits that check other types have type trait specializations. But also other useful things. For example, std::unique_ptr uses something similar to this. * Davis was keen to simply check pixel_traits is specialised. That's equivalent to checking pixel_traits<> is complete for some type * code review * juse use the void_t in dlib/type_traits.h * one liners * just need is_image_check * more tests for is_image_type * i think this is correct * removed printf * better docs * Keep opencv out of it * keep old face pose example, then add new one which uses dlib's ffmpeg wrappers * revert * revert * better docs * better docs --------- Co-authored-by: pf <pf@me>
2023-01-30 09:17:34 +08:00
sudo apt install libwebp-dev libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libswresample-dev libswscale-dev libavutil-dev
sudo apt install libopenblas-dev liblapack-dev
- name: Install gcc 11
run: |
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
- name: Configure
run: cmake ${{ github.workspace }}/dlib/test -B build
- 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
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
# Test the BLAS bindings
- name: Configure BLAS binding tests
run: cmake ${{ github.workspace }}/dlib/test/blas_bindings -B build_blas_bindings
- name: Build blas binding tests
run: cmake --build build_blas_bindings --config Debug --parallel 4
- name: Test BLAS bindings
run: build_blas_bindings/dtest --runall -q
ubuntu-20_04-gcc-7:
runs-on: 'ubuntu-20.04'
2023-01-03 23:13:54 +08:00
steps:
- uses: actions/checkout@v2
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
2023-01-03 23:13:54 +08:00
- name: Install dependencies
run: |
sudo apt update
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
sudo apt install libwebp-dev make yasm
2023-01-03 23:13:54 +08:00
- name: Install gcc 7
run: |
sudo apt install gcc-7 g++-7
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
- name: Cache FFmpeg 3.2.18
uses: actions/cache@v3
id: cache-ffmpeg3
with:
path: /home/runner/ffmpeg-n3.2.18_installation
key: ffmpeg-n3.2.18_try1
- name: Build FFmpeg 3.2.18
if: steps.cache-ffmpeg3.outputs.cache-hit != 'true'
run: |
wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n3.2.18.tar.gz
tar -xf n3.2.18.tar.gz
cd FFmpeg-n3.2.18
./configure --prefix=/home/runner/ffmpeg-n3.2.18_installation --disable-doc --disable-programs
make -j4
make install
cd ..
2023-01-03 23:13:54 +08:00
- name: Configure
run: |
export CC=/usr/bin/gcc-7
export CXX=/usr/bin/g++-7
cmake ${{ github.workspace }}/dlib/test -B build -DCMAKE_PREFIX_PATH=/home/runner/ffmpeg-n3.2.18_installation
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
2023-01-03 23:13:54 +08:00
- name: Build just tests
run: cmake --build build --config Release --target dtest --parallel 4
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
2023-01-03 23:13:54 +08:00
- name: Test
run: build/dtest --runall -q
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
2023-01-03 23:13:54 +08:00
- name: Build examples, etc
run: cmake --build build --config Release --parallel 2
2023-01-03 23:13:54 +08:00
# Test cmake scrips can build standalone dlib as a shared library
- name: Configure dlib as shared library
FFMPEG : misc + ffmpeg5 support (#2746) * - enhanced list_muxers() - added fail() error handling helper function - moved framerate setting to decoder_image_args * docs * oops * - don't use std::endl, use `\n` instead - use fail(). See, on average, it removes lines of code * convenient constructor for demuxer * ffmpeg5 support * added docs for == -1 * oops * grouping audio channel compatibility stuff together * more compatibility stuff * more channel abstractions * build with ffmpeg 5 * install assembler * cache the installation * cmake doesn't like using ~ in filepath * at some point this will work * i think i need to change the key * test FFmpeg-n5.1.3_try3 cache * bug fix * Update build_cpp.yml Giving this another go * Update build_cpp.yml Disable building documentation and CLI tools * Update CMakeLists.txt Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included * - use environment variables - on ubuntu 18 gcc7, use ffmpeg 3.2.18 * correct way of dereferencing variables ? * can't get variables to work * Revert "can't get variables to work" This reverts commit 5eef96a43ef9e04bc7780abfce75e1bb2f0ca25f. * Revert "correct way of dereferencing variables ?" This reverts commit e8ff95f5c6c317bc8f3e6dde4b017a533c6806b3. * Revert "- use environment variables" This reverts commit a6938333d555d64e6cddcb7482ab579827ba6dfb. * using ffmpeg 3.2.18 with ubuntu18 gcc7 * Update build_cpp.yml Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable * Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled * Fixed bad indentation * Can go in details namespace * Update dlib/CMakeLists.txt Co-authored-by: Davis E. King <davis685@gmail.com> * use details namespace * remove declaration. It's in details now * don't need get_channels_from_layout() --------- Co-authored-by: pf <pf@me> Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-30 10:12:47 +08:00
run: cmake ${{ github.workspace }}/dlib -B build_dlib_shared -DBUILD_SHARED_LIBS=1 -DCMAKE_PREFIX_PATH=/home/runner/ffmpeg-n3.2.18_installation
- name: Build dlib as shared library
run: cmake --build build_dlib_shared --parallel 4
ubuntu-latest-clang-default-avx:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
2022-06-18 10:19:11 +08:00
- name: Install dependencies
run: |
sudo apt update
FFMPEG wrappers: dlib::ffmpeg::decoder and dlib::ffmpeg::demuxer (#2707) * - added ffmpeg stuff to cmake * - added observer_ptr * ffmpeg utils * WIP * - added ffmpeg_decoder * config file for test data * another test file * install ffmpeg * added ffmpeg_demuxer * install all ffmpeg libraries * support older version of ffmpeg * simplified loop * - test converting to dlib object - added docs - support older ffmpeg * added convert() overload * added comment * only register stuff when API not deprecated * - fixed version issues - fixed decoding * added tests for ffmpeg_demuxer * removed unused code * test GIF * added docs * added audio test * test for audio * more tests * review changes * don't need observer_ptr * made deps public. I could be wrong but just in case. * - added some static asserts. Some areas of the code might do memcpy's on arrays of pixels. This requires the structures to be packed. Check this. - added convert() functions - changed default decoder options. By default, always decode to RGB and S16 audio - added convenience constructor to demuxer * - no longer need opencv * oops. I let that slip * - made a few functions public - more precise requires clauses * enhanced example * - avoid FFMPEG_INITIALIZED being optimized away at link time - added decoding example * - avoid -Wunused-parameter error * constexpr and noexcept correctness. This probably makes no difference to performance, BUT, it's what the core guidelines tell you to do. It does however demonstrate how complicated and unecessarily verbose C++ is becoming. Sigh, maybe one day i'll make the switch to something that doesn't make my eyes twitch. * - simplified metadata structure * hopefully more educational * added another example * ditto * typo * screen grab example * whoops * avoid -Wunused-parameter errors * ditto * - added methods to av_dict - print the demuxer format options that were not used - enhanced webcam_face_pose_ex.cpp so you can set webcam options * if height and width are specified, attempt to set video_size in format_options. Otherwise set the bilinear resizer. * updated docs * once again, the ffmpeg APIs do a lot for you. It's a matter of knowing which APIs to call. * made header-only * - some Werror thing * don't use type_safe_union * - templated sample type - reverted deep copy of AVFrame for frame copy constructor * - added is_pixel_type and is_pixel_check * unit tests for pixel traits * enhanced is_image_type type trait and added is_image_check * added unit tests for is_image_type * added pix_traits, improved convert() functions * bug fix * get rid of -Werror=unused-variable error * added a type alias * that's the last of the manual memcpys gone. We'using ffmpeg API everywhere now for copying frames to buffers and back * missing doc * set framerate for webcam * list input devices * oops. I was trying to make ffmpeg 5 happy but i've given up on ffmpeg v5 compatibility in this PR. Future PR. * enhanced the information provided by list_input_devices and list_output_devices * removed vscode settings.json file * - added a type trait for checking whether a type is complete. This is useful for writing type traits that check other types have type trait specializations. But also other useful things. For example, std::unique_ptr uses something similar to this. * Davis was keen to simply check pixel_traits is specialised. That's equivalent to checking pixel_traits<> is complete for some type * code review * juse use the void_t in dlib/type_traits.h * one liners * just need is_image_check * more tests for is_image_type * i think this is correct * removed printf * better docs * Keep opencv out of it * keep old face pose example, then add new one which uses dlib's ffmpeg wrappers * revert * revert * better docs * better docs --------- Co-authored-by: pf <pf@me>
2023-01-30 09:17:34 +08:00
sudo apt install libwebp-dev libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libswresample-dev libswscale-dev libavutil-dev
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
- name: Configure
run: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake ${{ github.workspace }}/dlib/test -B build -DUSE_AVX_INSTRUCTIONS=1
- 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
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
windows-latest:
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
# don't use CMake 3.25.0 https://gitlab.kitware.com/cmake/cmake/-/issues/23975
pip3 install cmake==3.24.0
cmake . -B build
- name: Build just tests
run: cmake --build build --config Release --target dtest --parallel 4
GitHub actions (#2289) * add github actions from "ptheywood/cuda-cmake-github-actions" * fix typo * rename * Revert "rename" This reverts commit ded445f3bb5b3190ec4ddc62876cb45b60d7948e. * add cudnn env variable * remove old cuda configs and try to fix installation * add run tests * fix test path * actually build tests * fix missing $ * fix syntax * debug test path * fix test build dir * fix cmake syntax * fix working directory * Revert "debug test path" This reverts commit 6d5b4e7a1fa9270281ad92f863a3ea4fe0b718a0. * uncomment other configurations * fix run test path * fix test run dir again * syntax * it's really not my day... * remove incompatible configs and make tests run silently * add initial windows script from ptheywood/cuda-cmake-github-actions * fix windows script path * add test for windows * remove dot slash * install cublas_dev * try adding cudnn (I really need a Windows machine to test this) * remove windows workflow scripts * try config with ubuntu 20.10 * fix syntax error * try to fix DLIB not using CUDA * try again with ubuntu 20.04 * remove backticks * remove superfluous configure step * fix cuda parsing for v10.2 * debug test * change working dir... * do not run test silently * install nvidia drivers * only install server drivers * load nvidia kernel module * move module loading to script * try to fix kernel module loading * add simple github actions workflow * add simple github actions workflow * fix path? * fix config step * only build the dtest target * handle Windows path * use ./ on windows * debugging * debugging * debugging * except for the timer test on macOS, the rest works * remove cuda custom tests, for the moment * build in Relase mode to try to avoid timeout on Windows * debugging * actually change build config * do not test the timer on macOS * try building python
2022-02-03 11:00:56 +08:00
- name: Test
run: build/Release/dtest.exe --runall -q
- name: Build ancillary tools
run: cmake --build build --config Release --target imglab htmlify dtoc --parallel 4
windows-2019:
runs-on: 'windows-2019'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
# don't use CMake 3.25.0 https://gitlab.kitware.com/cmake/cmake/-/issues/23975
pip3 install cmake==3.24.0
cmake . -B build
- name: Build just tests
run: cmake --build build --config Debug --target dtest --parallel 4
- name: Build ancillary tools
run: cmake --build build --config Release --target imglab htmlify dtoc --parallel 4
macos-latest:
runs-on: 'macos-latest'
steps:
- uses: actions/checkout@v2
- name: Configure
# MacOS machines often come with low quality BLAS libraries installed, so don't use those.
run: cmake ${{ github.workspace }}/dlib/test -B build -DDLIB_USE_BLAS=0 -DDLIB_USE_LAPACK=0
- name: Build just tests
run: cmake --build build --config Release --target dtest --parallel 4
- name: Test
run: build/dtest --runall --no_test_timer -q
- name: Build examples, etc
run: cmake --build build --config Release --parallel 2