🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6 KiB

2 years ago
  1. name: CMake
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. workflow_dispatch:
  8. env:
  9. # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  10. BUILD_TYPE: Release
  11. jobs:
  12. build:
  13. # The CMake configure and build commands are platform agnostic and should work equally
  14. # well on Windows or Mac. You can convert this to a matrix build if you need
  15. # cross-platform coverage.
  16. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  17. runs-on: ${{matrix.os}}
  18. strategy:
  19. matrix:
  20. os: [ubuntu-18.04]
  21. compiler: [g++-7, g++-9, g++-10, clang++]
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Configure CMake
  25. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  26. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  27. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{matrix.compiler}}
  28. - name: Build
  29. # Build your program with the given configuration
  30. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
  31. - name: Test
  32. working-directory: ${{github.workspace}}/build
  33. # Execute tests defined by the CMake configuration.
  34. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
  35. run: ctest -C ${{env.BUILD_TYPE}}