Add -Werror builds and a build with CRYFS_NO_COMPATIBILITY
This commit is contained in:
parent
c6bd069516
commit
b5bc602983
@ -10,9 +10,12 @@ inputs:
|
|||||||
build_type:
|
build_type:
|
||||||
description: "Which cmake build type to use (e.g. Release, Debug, RelWithDebInfo)"
|
description: "Which cmake build type to use (e.g. Release, Debug, RelWithDebInfo)"
|
||||||
required: true
|
required: true
|
||||||
cmake_flags:
|
extra_cmake_flags:
|
||||||
description: "Extra flags to add to the cmake command"
|
description: "Extra flags to add to the cmake command"
|
||||||
required: true
|
required: true
|
||||||
|
extra_cxxflags:
|
||||||
|
description: "Extra flags to add to the compiler"
|
||||||
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@ -35,9 +38,10 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -v
|
set -v
|
||||||
|
export CXXFLAGS="$CXXFLAGS ${{inputs.extra_cxxflags}}"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -GNinja -DCMAKE_CXX_COMPILER=${{inputs.cxx}} -DCMAKE_C_COMPILER=${{inputs.cc}} -DBUILD_TESTING=on -DCMAKE_BUILD_TYPE=${{inputs.build_type}} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache ${{inputs.cmake_flags}}
|
cmake .. -GNinja -DCMAKE_CXX_COMPILER=${{inputs.cxx}} -DCMAKE_C_COMPILER=${{inputs.cc}} -DBUILD_TESTING=on -DCMAKE_BUILD_TYPE=${{inputs.build_type}} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache ${{inputs.extra_cmake_flags}}
|
||||||
- name: Run ninja
|
- name: Run ninja
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
57
.github/workflows/main.yaml
vendored
57
.github/workflows/main.yaml
vendored
@ -70,10 +70,10 @@ jobs:
|
|||||||
- Debug
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
- RelWithDebInfo
|
- RelWithDebInfo
|
||||||
cmake_flags:
|
extra_cmake_flags: [""]
|
||||||
- ""
|
extra_cxxflags: [""]
|
||||||
install_dependencies_manually:
|
install_dependencies_manually: [false]
|
||||||
- false
|
run_tests: [true]
|
||||||
include:
|
include:
|
||||||
- name: Local dependencies
|
- name: Local dependencies
|
||||||
os: ubuntu-18.04
|
os: ubuntu-18.04
|
||||||
@ -82,8 +82,10 @@ jobs:
|
|||||||
cc: clang-11
|
cc: clang-11
|
||||||
apt_package: clang-11
|
apt_package: clang-11
|
||||||
build_type: RelWithDebInfo
|
build_type: RelWithDebInfo
|
||||||
cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
|
extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
|
||||||
|
extra_cxxflags: ""
|
||||||
install_dependencies_manually: true
|
install_dependencies_manually: true
|
||||||
|
run_tests: true
|
||||||
- name: Local dependencies
|
- name: Local dependencies
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
compiler:
|
compiler:
|
||||||
@ -91,10 +93,43 @@ jobs:
|
|||||||
cc: clang-11
|
cc: clang-11
|
||||||
apt_package: clang-11
|
apt_package: clang-11
|
||||||
build_type: RelWithDebInfo
|
build_type: RelWithDebInfo
|
||||||
cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
|
extra_cmake_flags: -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake
|
||||||
|
extra_cxxflags: ""
|
||||||
install_dependencies_manually: true
|
install_dependencies_manually: true
|
||||||
|
run_tests: true
|
||||||
|
- name: Werror gcc
|
||||||
|
os: ubuntu-20.04
|
||||||
|
compiler:
|
||||||
|
cxx: g++-9
|
||||||
|
cc: gcc-9
|
||||||
|
apt_package: g++-9
|
||||||
|
build_type: RelWithDebInfo
|
||||||
|
extra_cmake_flags: -DUSE_WERROR=on
|
||||||
|
extra_cxxflags: ""
|
||||||
|
install_dependencies_manually: false
|
||||||
|
run_tests: false
|
||||||
|
- name: Werror clang
|
||||||
|
os: ubuntu-20.04
|
||||||
|
compiler:
|
||||||
|
cxx: clang++-11
|
||||||
|
cc: clang-11
|
||||||
|
apt_package: clang++-11
|
||||||
|
build_type: RelWithDebInfo
|
||||||
|
extra_cmake_flags: -DUSE_WERROR=on
|
||||||
|
extra_cxxflags: ""
|
||||||
|
install_dependencies_manually: false
|
||||||
|
run_tests: false
|
||||||
|
- name: No compatibility
|
||||||
|
os: ubuntu-20.04
|
||||||
|
compiler:
|
||||||
|
cxx: clang++-11
|
||||||
|
cc: clang-11
|
||||||
|
apt_package: clang++-11
|
||||||
|
build_type: RelWithDebInfo
|
||||||
|
extra_cmake_flags: ""
|
||||||
|
extra_cxxflags: "-DCRYFS_NO_COMPATIBILITY"
|
||||||
|
install_dependencies_manually: false
|
||||||
|
run_tests: false
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
env:
|
env:
|
||||||
# Setting conan cache dir to a location where our Github Cache Action can find it
|
# Setting conan cache dir to a location where our Github Cache Action can find it
|
||||||
@ -187,7 +222,7 @@ jobs:
|
|||||||
- name: Hash flags
|
- name: Hash flags
|
||||||
id: hash_flags
|
id: hash_flags
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=hash_flags::$(echo ${{matrix.cmake_flags}} | md5sum)"
|
echo "::set-output name=hash_flags::$(echo __${{matrix.extra_cmake_flags}}__${{matrix.extra_cxxflags}}__ | md5sum)"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Retrieve ccache cache
|
- name: Retrieve ccache cache
|
||||||
# We're using an S3 based cache because the standard GitHub Action cache (actions/cache) only gives us 5GB of storage and we need more
|
# We're using an S3 based cache because the standard GitHub Action cache (actions/cache) only gives us 5GB of storage and we need more
|
||||||
@ -229,7 +264,8 @@ jobs:
|
|||||||
cxx: ${{ matrix.compiler.cxx }}
|
cxx: ${{ matrix.compiler.cxx }}
|
||||||
cc: ${{ matrix.compiler.cc }}
|
cc: ${{ matrix.compiler.cc }}
|
||||||
build_type: ${{ matrix.build_type }}
|
build_type: ${{ matrix.build_type }}
|
||||||
cmake_flags: ${{ matrix.cmake_flags }}
|
extra_cmake_flags: ${{ matrix.extra_cmake_flags }}
|
||||||
|
extra_cxxflags: ${{ matrix.extra_cxxflags }}
|
||||||
- name: Show ccache statistics
|
- name: Show ccache statistics
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -263,4 +299,5 @@ jobs:
|
|||||||
key: v0-${{ runner.os }}-${{ matrix.os }}-conancache__${{matrix.compiler.cxx}}__${{matrix.compiler.cc}}__${{matrix.build_type}}__
|
key: v0-${{ runner.os }}-${{ matrix.os }}-conancache__${{matrix.compiler.cxx}}__${{matrix.compiler.cc}}__${{matrix.build_type}}__
|
||||||
artifacts: ${{ env.CONAN_USER_HOME }}
|
artifacts: ${{ env.CONAN_USER_HOME }}
|
||||||
- name: Test
|
- name: Test
|
||||||
|
if: ${{ matrix.run_tests }}
|
||||||
uses: ./.github/workflows/actions/run_tests
|
uses: ./.github/workflows/actions/run_tests
|
||||||
|
@ -71,6 +71,7 @@ function(target_enable_style_warnings TARGET)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_WERROR)
|
if (USE_WERROR)
|
||||||
|
message(STATUS Building ${TARGET} with -Werror)
|
||||||
target_compile_options(${TARGET} PRIVATE -Werror)
|
target_compile_options(${TARGET} PRIVATE -Werror)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user