diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-12 15:42:05 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-12 15:42:05 (GMT) |
commit | 42f119eadfc4ddac38c5d5ae823a9cb12f97e2a1 (patch) | |
tree | 1739aea0df5615cfdcf9e43dede2768f0f044615 | |
parent | 050b247c2fa1f667c26794a4dbaa21254b2cb321 (diff) | |
download | Doxygen-42f119eadfc4ddac38c5d5ae823a9cb12f97e2a1.zip Doxygen-42f119eadfc4ddac38c5d5ae823a9cb12f97e2a1.tar.gz Doxygen-42f119eadfc4ddac38c5d5ae823a9cb12f97e2a1.tar.bz2 |
Add initial buildscope for Github Actions
-rw-r--r-- | .github/workflows/build_cmake.yml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml new file mode 100644 index 0000000..ea819ad --- /dev/null +++ b/.github/workflows/build_cmake.yml @@ -0,0 +1,68 @@ +name: CMake Build for Doxygen + +on: [push, pull_request] + +jobs: + build: + name: ${ { matrix.config.name } } + runs-on: ${ { matrix.config.os } } + strategy: + fail-fast: false + matrix: + config: + - { + name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz", + os: ubuntu-latest, + build_type: "Release", cc: "gcc", cxx: "g++" + } + steps: + - uses: actions/checkout@v1 + - name: Configure + shell: cmake -P {0} + run: | + set(ENV{CC} ${ { matrix.config.cc } }) + set(ENV{CXX} ${ { matrix.config.cxx } }) + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/ninja" ninja_program) + + execute_process( + COMMAND ${ { steps.cmake_and_ninja.outputs.cmake_dir } }/cmake + -S . + -B build + -D CMAKE_BUILD_TYPE=${ { matrix.config.build_type } } + -G Ninja + -D CMAKE_MAKE_PROGRAM=${ninja_program} + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Build + shell: cmake -P {0} + run: | + set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ") + + execute_process( + COMMAND ${ { steps.cmake_and_ninja.outputs.cmake_dir } }/cmake --build build + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Run tests + shell: cmake -P {0} + run: | + include(ProcessorCount) + ProcessorCount(N) + + execute_process( + COMMAND ${ { steps.cmake_and_ninja.outputs.cmake_dir } }/ctest -j ${N} + WORKING_DIRECTORY build + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Running tests failed!") + endif() + |