You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
267 lines
8.3 KiB
YAML
267 lines
8.3 KiB
YAML
name: On PRs - Linux Special Builds
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
|
|
jobs:
|
|
special_debugRelease:
|
|
name: 'Ubuntu 20.04 - GCC - Debug+Coverage'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 2
|
|
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get install ninja-build
|
|
pip3 install conan==1.45.0
|
|
pip3 install gcovr
|
|
|
|
- name: Conan common config
|
|
run: |
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile list
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: Build
|
|
run: |
|
|
cd build && \
|
|
cmake -GNinja \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DEXIV2_ENABLE_PNG=ON \
|
|
-DEXIV2_ENABLE_WEBREADY=ON \
|
|
-DEXIV2_ENABLE_CURL=ON \
|
|
-DEXIV2_BUILD_UNIT_TESTS=ON \
|
|
-DEXIV2_ENABLE_BMFF=ON \
|
|
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
|
|
-DEXIV2_BUILD_SAMPLES=ON \
|
|
-DBUILD_WITH_COVERAGE=ON \
|
|
-DCMAKE_INSTALL_PREFIX=install \
|
|
.. && \
|
|
cmake --build .
|
|
|
|
- name: Tests + Upload coverage
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|
|
# this needs to match th ecommand in on_push_ExtraJobsForMain.yml!
|
|
gcovr --root .. --object-dir . --exclude-unreachable-branches --exclude-throw-branches --xml -o coverage.xml
|
|
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
|
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
|
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
|
|
shasum -a 256 -c codecov.SHA256SUM
|
|
chmod +x codecov
|
|
ls -lh
|
|
./codecov -f coverage.xml
|
|
|
|
special_releaseValgrind:
|
|
name: 'Ubuntu 20.04 - GCC - Release+Valgrind'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install valgrind ninja-build
|
|
pip3 install conan==1.45.0
|
|
|
|
- name: Conan common config
|
|
run: |
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile list
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: Build
|
|
run: |
|
|
cd build
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DBUILD_WITH_COVERAGE=OFF -DCMAKE_INSTALL_PREFIX=install ..
|
|
cmake --build .
|
|
|
|
- name: Tests with valgrind
|
|
run: |
|
|
cd build/bin
|
|
valgrind ./unit_tests
|
|
|
|
|
|
special_releaseSanitizers:
|
|
name: 'Ubuntu 20.04 - GCC - Release+Sanitizers'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get install ninja-build
|
|
pip3 install conan==1.45.0
|
|
|
|
- name: Conan common config
|
|
run: |
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile list
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: Build
|
|
run: |
|
|
cd build && \
|
|
cmake -GNinja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DEXIV2_BUILD_SAMPLES=ON \
|
|
-DEXIV2_ENABLE_PNG=ON \
|
|
-DEXIV2_ENABLE_WEBREADY=ON \
|
|
-DEXIV2_ENABLE_CURL=ON \
|
|
-DEXIV2_BUILD_UNIT_TESTS=ON \
|
|
-DEXIV2_ENABLE_BMFF=ON \
|
|
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
|
|
-DBUILD_WITH_COVERAGE=OFF \
|
|
-DEXIV2_TEAM_USE_SANITIZERS=ON \
|
|
-DCMAKE_INSTALL_PREFIX=install \
|
|
.. && \
|
|
cmake --build .
|
|
|
|
- name: Tests
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|
|
|
|
special_allEnabled:
|
|
name: 'Ubuntu 20.04 - GCC - All Options Enabled + Documentation'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install valgrind doxygen graphviz gettext
|
|
pip3 install conan==1.45.0
|
|
|
|
- name: Conan common config
|
|
run: |
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile list
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: Build
|
|
run: |
|
|
cd build && \
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DEXIV2_BUILD_SAMPLES=ON \
|
|
-DEXIV2_ENABLE_PNG=ON \
|
|
-DEXIV2_ENABLE_WEBREADY=ON \
|
|
-DEXIV2_ENABLE_CURL=ON \
|
|
-DEXIV2_BUILD_UNIT_TESTS=ON \
|
|
-DEXIV2_ENABLE_BMFF=ON \
|
|
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
|
|
-DBUILD_WITH_COVERAGE=ON \
|
|
-DEXIV2_BUILD_DOC=ON \
|
|
-DEXIV2_ENABLE_NLS=ON \
|
|
-DCMAKE_CXX_FLAGS="-DEXIV2_DEBUG_MESSAGES" \
|
|
.. && \
|
|
make -j
|
|
|
|
- name: Generate documentation
|
|
run: |
|
|
make doc
|
|
|
|
special_pvsStudio:
|
|
name: 'Ubuntu 20.04 - GCC - Static Analyzer: PVS-Studio'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 2
|
|
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
pip3 install conan==1.45.0
|
|
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
|
|
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add -
|
|
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -qq pvs-studio
|
|
|
|
- name: Conan common config
|
|
run: |
|
|
conan profile new --detect default
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
|
|
- name: Run Conan
|
|
run: |
|
|
mkdir build && cd build
|
|
conan profile list
|
|
conan profile show default
|
|
conan install .. -o webready=True --build missing
|
|
|
|
- name: Configure
|
|
run: |
|
|
cd build && \
|
|
cmake -DCMAKE_BUILD_TYPE=Debug \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DEXIV2_ENABLE_PNG=ON \
|
|
-DEXIV2_ENABLE_WEBREADY=ON \
|
|
-DEXIV2_ENABLE_CURL=ON \
|
|
-DEXIV2_BUILD_UNIT_TESTS=ON \
|
|
-DEXIV2_ENABLE_BMFF=ON \
|
|
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
|
|
-DBUILD_WITH_COVERAGE=ON \
|
|
-DCMAKE_INSTALL_PREFIX=install \
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
.. \
|
|
|
|
- name: Static Analysis
|
|
env:
|
|
PVS_USERNAME: ${{ secrets.PVS_USERNAME }}
|
|
PVS_KEY: ${{ secrets.PVS_KEY }}
|
|
run: |
|
|
cd build
|
|
pvs-studio-analyzer credentials $PVS_USERNAME $PVS_KEY -o PVS_license.lic
|
|
pvs-studio-analyzer analyze -l PVS_license.lic -o pvsStudio.log -j4
|
|
plog-converter -a GA:1,2 -d V1042 -t fullhtml pvsStudio.log -o pvsReportHtml
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: static_analysis
|
|
path: build/pvsReportHtml
|
|
retention-days: 7
|
|
|
|
|