Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mostly meson CI updates #2523

Merged
merged 9 commits into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/nightly_Linux_distributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
container:
image: ${{ matrix.container_image }}
env:
CXX: ${{matrix.compiler}}
CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install

steps:
Expand All @@ -36,6 +37,6 @@ jobs:
- name: build and compile
run: |
mkdir build && cd build
cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libraries }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} ..
cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libraries }} ..
cmake --build . --parallel
cmake --install .
4 changes: 3 additions & 1 deletion .github/workflows/on_PR_linux_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
sudo apt-get install ninja-build

- name: build and compile
env:
CXX: clang++
run: |
cmake --preset linux-sanitizers -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$(which clang++) -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_VIDEO=ON
cmake --preset linux-sanitizers -S . -B build -DCMAKE_BUILD_TYPE=Release -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_BUILD_UNIT_TESTS=OFF
cmake --build build --parallel

- name: Fuzz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_PR_linux_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Build
run: |
cmake --preset base_linux -S . -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DEXIV2_ENABLE_VIDEO=ON
cmake --preset base_linux -S . -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}}
cmake --build build-base_linux --parallel

- name: Install
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/on_PR_linux_special_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Build
run: |
cmake --preset linux-coverage -S . -B build -DEXIV2_ENABLE_VIDEO=ON
cmake --preset linux-coverage -S . -B build
cmake --build build --parallel

- name: Tests + Upload coverage
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

- name: Build
run: |
cmake --preset linux-sanitizers -S . -B build -DEXIV2_ENABLE_VIDEO=ON
cmake --preset linux-sanitizers -S . -B build
cmake --build build --parallel

- name: Tests
Expand Down Expand Up @@ -151,8 +151,10 @@ jobs:
conan install .. -o webready=True --build missing

- name: Build
env:
CXXFLAGS: -DEXIV2_DEBUG_MESSAGES
run: |
cmake --preset linux-release -S . -B build -DEXIV2_BUILD_DOC=ON -DCMAKE_CXX_FLAGS="-DEXIV2_DEBUG_MESSAGES"
cmake --preset linux-release -S . -B build -DEXIV2_BUILD_DOC=ON
cmake --build build --parallel

- name: Generate documentation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_PR_mac_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
build_type: [Release, Debug]
shared_libraries: [ON, OFF]

steps:
- uses: actions/checkout@v3

Expand All @@ -31,7 +31,7 @@ jobs:

- name: Build
run: |
cmake --preset base_mac -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DEXIV2_ENABLE_VIDEO=ON
cmake --preset base_mac -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}}
cmake --build build --parallel

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_PR_mac_special_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Build
run: |
cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON -DEXIV2_ENABLE_VIDEO=ON
cmake --preset base_mac -S . -B build -DEXIV2_TEAM_USE_SANITIZERS=ON
cmake --build build --parallel

- name: Tests
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/on_PR_meson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Linux-GCC${{matrix.cxx}}-${{matrix.deps}}-${{matrix.type}}
strategy:
matrix:
cxx: ['7', '8', '9']
cxx: ['7', '8', '9', '10']
deps: ['forcefallback', 'default']
type: ['shared', 'static']
steps:
Expand All @@ -23,18 +23,21 @@ jobs:
sudo apt install -y g++-${{matrix.cxx}}
python3 -m pip install meson ninja

- name: Sanity Checks
- name: Compile and Test
env:
CXX: g++-${{matrix.cxx}}
run: |
env CXX=g++-${{matrix.cxx}} meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose

VisualStudio:
runs-on: windows-latest
name: MSVC-${{matrix.deps}}-${{matrix.type}}
name: MSVC-${{matrix.deps}}-${{matrix.type}}-${{matrix.platform}}
strategy:
matrix:
deps: ['forcefallback', 'default']
platform: ['x64', 'x86']
type: ['shared', 'static']
steps:
- uses: actions/checkout@v3
Expand All @@ -44,7 +47,12 @@ jobs:
python -m pip install meson ninja

- uses: ilammy/msvc-dev-cmd@v1
- name: Sanity Checks
with:
arch: ${{matrix.platform}}

- name: Compile and Test
env:
CXXFLAGS: '/analyze'
run: |
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
Expand All @@ -64,7 +72,7 @@ jobs:
run: |
python3 -m pip install meson ninja

- name: Compile
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/on_PR_meson_clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@ jobs:
name: Linux-Clang${{matrix.cxx}}-${{matrix.deps}}-${{matrix.type}}
strategy:
matrix:
cxx: ['7', '8', '9']
cxx: ['7', '8', '9', '10', '12']
deps: ['forcefallback', 'default']
type: ['shared', 'static']
steps:
- uses: actions/checkout@v3

- name: Install packages
run: |
sudo apt install -y clang-${{matrix.cxx}} libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev
sudo apt install -y clang-${{matrix.cxx}} libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev lld-${{matrix.cxx}}
python3 -m pip install meson ninja

- name: Sanity Checks
- name: Compile and Test
env:
CXX: clang++-${{matrix.cxx}}
CXXFLAGS: -stdlib=libc++
CXX_LD: lld-${{matrix.cxx}}
run: |
env CXX=clang++-${{matrix.cxx}} CXXFLAGS=-stdlib=libc++ meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3 -Dcpp_std=c++20
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Ddefault_library=${{matrix.type}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
6 changes: 1 addition & 5 deletions .github/workflows/on_PR_windows_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Build
run: |
cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} -DEXIV2_ENABLE_VIDEO=ON
cmake --preset base_windows -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.shared_libraries}}
cmake --build build --parallel

- name: Install
Expand Down Expand Up @@ -131,12 +131,10 @@ jobs:
- name: Build
run: |
cmake --preset base_windows \
-DCMAKE_CXX_FLAGS=-Wno-deprecated \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \
-DCONAN_AUTO_INSTALL=OFF \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF \
-DEXIV2_ENABLE_VIDEO=ON \
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
-S . -B build && \
cmake --build build --parallel
Expand Down Expand Up @@ -185,14 +183,12 @@ jobs:
- name: Build
run: |
cmake --preset base_windows \
-DCMAKE_CXX_FLAGS=-Wno-deprecated \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DBUILD_SHARED_LIBS=${{matrix.shared_libraries}} \
-DCONAN_AUTO_INSTALL=OFF \
-DEXIV2_BUILD_SAMPLES=OFF \
-DEXIV2_BUILD_UNIT_TESTS=OFF \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF \
-DEXIV2_ENABLE_VIDEO=ON \
-S . -B build && \
cmake --build build --parallel

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on_push_BasicWinLinMac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Build
run: |
cmake --preset win-release -S . -B build -DEXIV2_ENABLE_VIDEO=ON
cmake --preset win-release -S . -B build
cmake --build build --parallel


Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:

- name: build and compile
run: |
cmake --preset linux-release-NoConan -S . -B build -DEXIV2_ENABLE_VIDEO=ON
cmake --preset linux-release-NoConan -S . -B build
cmake --build build --parallel

- name: Test
Expand All @@ -107,7 +107,7 @@ jobs:

- name: build and compile
run: |
cmake --preset base_mac -S . -B build -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DEXIV2_ENABLE_VIDEO=ON
cmake --preset base_mac -S . -B build
cmake --build build --parallel

- name: Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_push_ExtraJobsForMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Build
run: |
cmake --preset linux-coverage -S . -B build -DEXIV2_ENABLE_VIDEO=ON
cmake --preset linux-coverage -S . -B build
cmake --build build

- name: Tests + Upload coverage
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ jobs:
-DEXIV2_ENABLE_BMFF=ON \
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
-DEXIV2_BUILD_DOC=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations"
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
cmake --build build -t doc
cmake --build build -t package

Expand Down