2022-04-19 19:52:12 +08:00
|
|
|
name: C++
|
2022-02-03 11:00:56 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-02-21 08:05:02 +08:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-02-03 11:00:56 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
config: Release
|
|
|
|
build_dir: build
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2022-02-14 01:06:04 +08:00
|
|
|
working-directory: dlib/test
|
2022-02-03 11:00:56 +08:00
|
|
|
|
|
|
|
jobs:
|
2022-04-19 19:52:12 +08:00
|
|
|
ubuntu-latest-gcc-default:
|
2022-02-14 01:06:04 +08:00
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-06-18 10:19:11 +08:00
|
|
|
- name: Install dependencies
|
2022-04-19 19:52:12 +08:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libwebp-dev
|
2022-02-14 01:06:04 +08:00
|
|
|
- name: Configure
|
|
|
|
run: cmake ${{ github.workspace }}/dlib/test -B ${{ env.build_dir }}
|
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall -q
|
|
|
|
- name: Build examples, etc
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|
2022-02-03 11:00:56 +08:00
|
|
|
|
2022-02-14 01:06:04 +08:00
|
|
|
ubuntu-latest-gcc-11:
|
|
|
|
runs-on: 'ubuntu-latest'
|
2022-02-03 11:00:56 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-06-18 10:19:11 +08:00
|
|
|
- name: Install dependencies
|
2022-02-14 01:06:04 +08:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
2022-04-19 19:52:12 +08:00
|
|
|
sudo apt install libwebp-dev
|
|
|
|
- name: Install gcc 11
|
|
|
|
run: |
|
2022-02-14 01:06:04 +08:00
|
|
|
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 ${{ env.build_dir }}
|
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall -q
|
|
|
|
- name: Build examples, etc
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|
2022-02-03 11:00:56 +08:00
|
|
|
|
2023-01-03 23:13:54 +08:00
|
|
|
ubuntu-18_04-gcc-7:
|
|
|
|
runs-on: 'ubuntu-18.04'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libwebp-dev
|
|
|
|
- name: Install gcc 7
|
|
|
|
run: |
|
|
|
|
sudo apt install gcc-7 g++-7
|
|
|
|
- name: Configure
|
|
|
|
run: cmake ${{ github.workspace }}/dlib/test -B ${{ env.build_dir }}
|
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall -q
|
|
|
|
- name: Build examples, etc
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|
|
|
|
|
2022-02-14 01:06:04 +08:00
|
|
|
ubuntu-latest-clang-default:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-06-18 10:19:11 +08:00
|
|
|
- name: Install dependencies
|
2022-04-19 19:52:12 +08:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libwebp-dev
|
2022-02-03 11:00:56 +08:00
|
|
|
- name: Configure
|
2022-02-07 10:36:56 +08:00
|
|
|
run: |
|
2022-02-14 01:06:04 +08:00
|
|
|
export CC=/usr/bin/clang
|
|
|
|
export CXX=/usr/bin/clang++
|
|
|
|
cmake ${{ github.workspace }}/dlib/test -B ${{ env.build_dir }}
|
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall -q
|
|
|
|
- name: Build examples, etc
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|
2022-02-03 11:00:56 +08:00
|
|
|
|
2022-02-14 01:06:04 +08:00
|
|
|
ubuntu-latest-clang-13:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-06-18 10:19:11 +08:00
|
|
|
- name: Install dependencies
|
2022-04-19 19:52:12 +08:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libwebp-dev
|
2022-02-14 01:06:04 +08:00
|
|
|
- name: Install clang 13
|
|
|
|
run: |
|
|
|
|
wget https://apt.llvm.org/llvm.sh
|
|
|
|
chmod +x llvm.sh
|
|
|
|
sudo ./llvm.sh 13
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
export CC=/usr/bin/clang-13
|
|
|
|
export CXX=/usr/bin/clang++-13
|
|
|
|
cmake ${{ github.workspace }}/dlib/test -B ${{ env.build_dir }}
|
2022-02-07 11:26:31 +08:00
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
2022-02-14 01:06:04 +08:00
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall -q
|
|
|
|
- name: Build examples, etc
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|
2022-02-07 11:26:31 +08:00
|
|
|
|
2022-02-14 01:06:04 +08:00
|
|
|
windows-latest:
|
|
|
|
runs-on: 'windows-latest'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Configure
|
2022-11-29 09:10:47 +08:00
|
|
|
run: |
|
|
|
|
# don't use CMake 3.25.0 https://gitlab.kitware.com/cmake/cmake/-/issues/23975
|
|
|
|
pip3 install cmake==3.24.0
|
|
|
|
cmake . -B ${{ env.build_dir }}
|
2022-02-14 01:06:04 +08:00
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
2022-02-03 11:00:56 +08:00
|
|
|
- name: Test
|
2022-02-14 01:06:04 +08:00
|
|
|
run: ${{ env.build_dir }}/${{ env.config }}/dtest.exe --runall -q
|
2022-04-30 09:49:57 +08:00
|
|
|
- name: Build ancillary tools
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target imglab htmlify dtoc --parallel 4
|
2022-02-07 08:47:05 +08:00
|
|
|
|
2022-08-01 05:45:46 +08:00
|
|
|
windows-2019:
|
|
|
|
runs-on: 'windows-2019'
|
2022-07-13 08:40:11 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Configure
|
2022-11-29 09:10:47 +08:00
|
|
|
run: |
|
|
|
|
# don't use CMake 3.25.0 https://gitlab.kitware.com/cmake/cmake/-/issues/23975
|
|
|
|
pip3 install cmake==3.24.0
|
|
|
|
cmake . -B ${{ env.build_dir }}
|
2022-07-13 08:40:11 +08:00
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config Debug --target dtest --parallel 4
|
|
|
|
- name: Build ancillary tools
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target imglab htmlify dtoc --parallel 4
|
|
|
|
|
2022-02-14 01:06:04 +08:00
|
|
|
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 ${{ env.build_dir }} -DDLIB_USE_BLAS=0 -DDLIB_USE_LAPACK=0
|
|
|
|
- name: Build just tests
|
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --target dtest --parallel 4
|
|
|
|
- name: Test
|
|
|
|
run: ${{ env.build_dir }}/dtest --runall --no_test_timer -q
|
2022-02-07 08:47:05 +08:00
|
|
|
- name: Build examples, etc
|
2022-02-07 10:28:24 +08:00
|
|
|
run: cmake --build ${{ env.build_dir }} --config ${{ env.config }} --parallel 2
|