Update Fedora and RHEL requirements in README #274
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: OpenELP CI | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- devel | |
- main | |
- release/* | |
jobs: | |
build_and_test: | |
name: Build and Test | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
build_type: [Release] | |
include: | |
- os: macos-latest | |
test_target: test | |
extra_flags: -Werror | |
- os: ubuntu-latest | |
test_target: test | |
extra_flags: -Werror -Wformat-overflow -Wformat-security | |
- os: windows-latest | |
test_target: RUN_TESTS | |
extra_flags: /WX | |
extra_compiler_flags: |- | |
/experimental:external | |
/external:anglebrackets | |
/external:W0 | |
steps: | |
- name: Cache PCRE2 | |
uses: actions/cache@v4 | |
with: | |
path: ${{runner.workspace}}/build/pcre-prefix/src/pcre2-10.42.tar.gz | |
key: pcre2-10.42 | |
- name: Clone project | |
uses: actions/checkout@v4 | |
- name: Get snapshot ID | |
id: get-snap-id | |
shell: bash | |
run: echo "snap_id=git${{github.sha}}" | cut -c-19 >> $GITHUB_OUTPUT | |
- name: Create build environment | |
shell: bash | |
working-directory: ${{runner.workspace}} | |
run: mkdir -p build | |
- name: Configure project | |
working-directory: ${{runner.workspace}}/build | |
run: |- | |
cmake ${{github.workspace}} | |
-Werror=dev | |
-Werror=deprecated | |
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
-DBUILD_TESTING:BOOL=ON | |
-DBUILD_SHARED_LIBS:BOOL=ON | |
-DOPENELP_DOC_HTMLHELP:BOOL=OFF | |
-DOPENELP_BUNDLE_PCRE:BOOL=ON | |
-DOPENELP_USE_OPENSSL:BOOL=OFF | |
-DCPACK_GENERATOR=ZIP | |
-DCPACK_PACKAGE_FILE_NAME=OpenELP-${{runner.os}} | |
-DCPACK_TOPLEVEL_TAG=${{runner.os}} | |
-DOPENELP_EXTRA_VERSION=${{steps.get-snap-id.outputs.snap_id}} | |
-DCMAKE_C_FLAGS="${{matrix.extra_flags}} ${{matrix.extra_compiler_flags}}" | |
-DCMAKE_EXE_LINKER_FLAGS="${{matrix.extra_flags}}" | |
-DCMAKE_SHARED_LINKER_FLAGS="${{matrix.extra_flags}}" | |
-DCMAKE_STATIC_LINKER_FLAGS="${{matrix.extra_flags}}" | |
- name: Build PCRE2 | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config ${{matrix.build_type}} | |
-j2 | |
-t pcre | |
- name: Build project | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config ${{matrix.build_type}} | |
-j2 | |
- name: Test project | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config ${{matrix.build_type}} | |
-j2 | |
-t ${{matrix.test_target}} | |
if: ${{matrix.test_target}} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
- name: Package project | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config ${{matrix.build_type}} | |
-j2 | |
-t package | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenELP-${{runner.os}} | |
path: ${{runner.workspace}}/build/_CPack_Packages/${{runner.os}}/ZIP/OpenELP-${{runner.os}}/* | |
build_documentation: | |
name: Build Documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install Prerequisites | |
run: sudo apt-get install libclang-cpp9 libclang1-9 -y | |
- name: Cache Doxygen | |
id: cache-doxygen | |
uses: actions/cache@v4 | |
with: | |
path: ${{runner.workspace}}/doxygen | |
key: doxygen-1.9.7 | |
- name: Download Doxygen | |
if: steps.cache-doxygen.outputs.cache-hit != 'true' | |
working-directory: ${{runner.workspace}} | |
run: | | |
wget -O - https://www.doxygen.nl/files/doxygen-1.9.7.linux.bin.tar.gz | tar -xz | |
mv doxygen-1.9.7 doxygen | |
- name: Clone project | |
uses: actions/checkout@v4 | |
- name: Create build environment | |
shell: bash | |
run: | | |
mkdir -p ${{runner.workspace}}/build | |
echo "WARN_AS_ERROR = FAIL_ON_WARNINGS" >> doc/Doxyfile.in | |
- name: Configure project | |
working-directory: ${{runner.workspace}}/build | |
run: |- | |
cmake ${{github.workspace}} | |
-Werror=dev | |
-Werror=deprecated | |
-DCMAKE_PROGRAM_PATH:PATH="${{runner.workspace}}/doxygen/bin" | |
-DBUILD_TESTING:BOOL=OFF | |
-DBUILD_SHARED_LIBS:BOOL=OFF | |
-DOPENELP_DOC_HTMLHELP:BOOL=OFF | |
-DOPENELP_BUNDLE_PCRE:BOOL=OFF | |
-DOPENELP_USE_OPENSSL:BOOL=OFF | |
-DOPENELP_EXTRA_VERSION=${{steps.get-snap-id.outputs.snap_id}} | |
-DOPENELP_DOC_INTERNAL=ON | |
- name: Build documentation | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
-j2 | |
-t doc | |
- name: Upload documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OpenELP-HTML-Docs | |
path: ${{runner.workspace}}/build/doc/html/* | |
coverage: | |
name: Code Coverage | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v4 | |
- name: Create build environment | |
shell: bash | |
working-directory: ${{runner.workspace}} | |
run: mkdir -p build | |
- name: Configure project | |
working-directory: ${{runner.workspace}}/build | |
run: |- | |
cmake ${{github.workspace}} | |
-Wno-dev | |
-DCMAKE_BUILD_TYPE=Debug | |
-DBUILD_TESTING:BOOL=ON | |
-DBUILD_SHARED_LIBS:BOOL=ON | |
-DOPENELP_BUNDLE_PCRE:BOOL=OFF | |
-DOPENELP_USE_OPENSSL:BOOL=OFF | |
-DCMAKE_C_FLAGS="--coverage" | |
- name: Build project | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config Debug | |
-j2 | |
- name: Test project | |
run: |- | |
cmake | |
--build ${{runner.workspace}}/build | |
--config Debug | |
-j2 | |
-t test | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
- name: Upload coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
directory: ${{github.workspace}} | |
gcov_args: -s ${{github.workspace}} | |
gcov_path_exclude: '*/CompilerIdC/*' | |
gcov_root_dir: ${{runner.workspace}}/build | |
working-directory: ${{github.workspace}} |