| name: 'Build with CMake' |
| |
| on: |
| push: |
| branches: [ '*' ] |
| pull_request: |
| branches: [ '*' ] |
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.ref }} |
| cancel-in-progress: true |
| |
| env: |
| BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| compiler: |
| runs-on: ubuntu-22.04 |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 |
| with: |
| persist-credentials: false |
| |
| - name: Install dependencies |
| timeout-minutes: 10 |
| run: | |
| sudo apt-get update -yq |
| sudo apt-get install -y --no-install-recommends $BUILD_DEPS |
| |
| - name: Generate makefile using CMake |
| timeout-minutes: 10 |
| run: | |
| mkdir cmake_build |
| cd cmake_build |
| cmake .. -DBUILD_LIBRARIES=OFF |
| |
| - name: Run make |
| timeout-minutes: 30 |
| run: | |
| cd cmake_build |
| cmake --build . |
| |
| - name: Run test |
| timeout-minutes: 30 |
| run: | |
| cd cmake_build |
| ctest -j$(nproc --ignore=2) |
| |
| - name: Upload LastTest log |
| if: always() |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: cmake-LastTest-log |
| path: cmake_build/Testing/Temporary/LastTest.log |
| if-no-files-found: warn |