From 0ca5f450b79392c0c48fe5517590ed1bc4fd1c87 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Thu, 10 Mar 2022 22:43:38 +0100 Subject: [PATCH] Added a Github Action for CMake (#6542) --- .github/workflows/build_servers_cmake.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build_servers_cmake.yml diff --git a/.github/workflows/build_servers_cmake.yml b/.github/workflows/build_servers_cmake.yml new file mode 100644 index 0000000000..de48450131 --- /dev/null +++ b/.github/workflows/build_servers_cmake.yml @@ -0,0 +1,46 @@ +name: Build servers with CMake +# build_servers_cmake.yml + +on: + push: + branches: + - master + pull_request: + paths: + # Always trigger all Github Actions if an action or something CI related was changed + - '.github/workflows/**' + - 'tools/ci/**' + # This workflow should run when a file in a source directory has been modified. + - 'src/**' + - '3rdparty/**' + +jobs: + build: + # Github Actions checks for '[ci skip]', '[skip ci]', '[no ci]', '[skip actions]', or '[actions skip]' but not a hyphenated version. + # It's a catch-all incase a Pull Request has been opened and someone is on auto-pilot. + if: "!contains(github.event.head_commit.message, 'ci-skip')" + runs-on: ${{ matrix.os }} + strategy: + matrix: + # The ubuntu-latest label currently points to ubuntu-18.04. + # Available: ubuntu-20.04, ubuntu-18.04 + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v2 + + # Install latest CMake. + - uses: lukka/get-cmake@latest + + - name: Create build directory + run: mkdir cbuild + + - name: Create Unix Makefiles + run: | + cd cbuild + cmake -G "Unix Makefiles" .. + + - name: Command - make + run: | + cd cbuild + make