* avoid re-declaration of constant variables * Replace pthreads critical section with std::mutex * ci - better naming * cmake - increase minimum version to 3.11. Use project DESCRIPTION * fix - do not treat string::find() return type as bool * remove conditions that were always true * remove condition that were always false * Remove EXV_HAVE_GMTIME_R which is not used anymore * pixelWidth_ was inherited from Exiv2::Image The width & height variables in the TiffImage class need to be mutable to be able to change their values on the getters pixelHeight() and pixelWidth() ... Do not ask me why ... * Remove superfluous if * pvs:V766 item with identical key added already * pvs:V730 not all members were initialized (time) * pvs:V730 not all members are initialized * pvs:v668 no point in testing pointer against null after new * pvs:V1048 variable assigned the same value * replace c-style dynamic vector with std one * pvs:547 fakeData is always true * Remove useless constructor in derived class * pvs:V690 modern way to disable copy-ctor * Replace malloc/free with new/delete. No need to check for null * pvs:V1028 cast operands and not result * Remove custom MIN/MAX functions * pvs:V595 pointer used before verified against null * pvs: index used before being checked * pvs:V1028 possible overflow. Cast operands * pvs:v575 potential null pointer passed to other functions * pvs:V547 deal with always true/false expressions * pvs:V560 part of conditional expressions always false or true * pvs:V701 possible break in realloc -> move to std::vector * Make some classes 'final' * Replace sprintf with std::to_string() * fix compilation on windows
119 lines
3.5 KiB
YAML
119 lines
3.5 KiB
YAML
# Basic CI for all platforms on push
|
|
# Note that we want to run this as fast as possible and just for the more common configurations. On
|
|
# PRs, we will test things more intensively :)
|
|
# - Only running UnitTests and not regression tests
|
|
|
|
on: [push]
|
|
name: Basic CI for all platforms on push
|
|
|
|
jobs:
|
|
windows:
|
|
name: 'Win10 Arch:x64 BuildType:Release - SHARED'
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Ninja
|
|
uses: ashutoshvarma/setup-ninja@master
|
|
with:
|
|
version: 1.10.0
|
|
|
|
- name: Set up Visual Studio shell
|
|
uses: egor-tensin/vs-shell@v2
|
|
with:
|
|
arch: x64
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install Conan & Common config
|
|
run: |
|
|
pip.exe install conan
|
|
conan profile new --detect default
|
|
conan profile show default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
md build
|
|
cd build
|
|
conan profile list
|
|
conan install .. --build missing
|
|
|
|
- name: Build
|
|
run: |
|
|
cd build
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_WIN_UNICODE=OFF -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install ..
|
|
cmake --build .
|
|
|
|
|
|
- name: Test
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|
|
|
|
Linux:
|
|
name: 'Ubuntu 20.04 - GCC - Arch:x64 BuildType:Release - SHARED'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get install ninja-build
|
|
pip3 install conan==1.36.0
|
|
|
|
- name: Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: build and compile
|
|
run: |
|
|
cd build
|
|
cmake -GNinja -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
|
|
cmake --build .
|
|
|
|
- name: Test
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|
|
|
|
MacOS:
|
|
name: 'MacOS - clang - Arch:x64 BuildType:Release - SHARED'
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
brew install ninja
|
|
pip3 install conan==1.36.0
|
|
|
|
- name: Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile new --detect default
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
# Hack: Delete cmake_find_package generated files to fix compilation on mac.
|
|
rm Find*
|
|
|
|
- name: build and compile
|
|
run: |
|
|
cd build
|
|
cmake -GNinja -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" ..
|
|
cmake --build .
|
|
|
|
- name: Test
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|